Thursday, October 08, 2026

OS in Rust?

Redox: 
The OS Written Entirely in Rust! 🦀 Is This the Future of Computing? - YouTube

Jeremy Soller: "10 Years of Redox OS and Rust" | RustConf 2025 - YouTube

there are several operating systems and microkernels written in Rust. Rust’s memory safety, concurrency guarantees, and lack of a runtime or garbage collector make it an incredibly popular language for modern systems programming, especially for microkernels and embedded "micro" operating systems.

Here are the most notable micro-operating systems and microkernels written in Rust:

1. Redox OS (General Purpose Microkernel)

Redox OS is by far the most famous and mature operating system written entirely in Rust[1]. It is a Unix-like, general-purpose operating system built on a custom microkernel[1][2].

  • Design: It strictly follows the microkernel architecture, keeping the kernel as small as possible and pushing drivers, file systems, and network stacks into user space to prevent system-wide crashes.

  • Current State: It is highly usable for an experimental OS. It features a complete GUI (the Orbital desktop, and recently integrating System76's COSMIC apps), a web browser (NetSurf), and command-line utilities[1][3].

2. Tock OS (Secure Embedded OS)

Tock is a secure, embedded operating system designed for microcontrollers (like ARM Cortex-M and RISC-V)[4].

  • Design: Tock acts much like a microkernel for IoT devices. It runs a core kernel in privileged mode and isolates untrusted applications (which can be written in any language) in unprivileged user space[4][5].

  • Use Case: It is actively used in industry for Root-of-Trust (RoT) implementations and secure embedded environments (such as OpenTitan and Microsoft Pluton)[5].

3. Hubris OS (Message-Passing Embedded Microkernel)

Created by Oxide Computer Company, Hubris is a lightweight, open-source operating system designed for deeply embedded systems.

  • Design: It features a microkernel-style architecture that heavily relies on memory protection and isolated tasks (called "servers"). Instead of direct function calls between components, everything communicates via a synchronous message-passing system.

4. Theseus OS (Experimental / Language-Based OS)

While not a traditional microkernel, Theseus is a heavily researched, from-scratch OS written in Rust that achieves similar (and often better) goals of isolation and modularity.

  • Design: Instead of using hardware (like the MMU) to isolate components into different address spaces like a traditional microkernel, Theseus uses a "Single Address Space Operating System" (SASOS) model. It relies entirely on Rust's compiler, type system, and borrow checker to guarantee that modules cannot corrupt one another.

5. Drone OS (Real-Time OS)

Drone is an embedded real-time operating system (RTOS) written in Rust[6]. While traditionally called an RTOS rather than a microkernel, it fits the description of a "micro-OS." It is heavily optimized for energy efficiency, interrupt-driven design, and minimal footprint for modern microcontrollers.

6. Unikernels (RustyHermit)

If by "micro-OS" you are referring to extremely small, single-purpose virtual machines used in cloud computing, Rust has a strong presence there as well. RustyHermit (a Rust rewrite of HermitCore) is a unikernel designed to run standard Rust applications on bare metal or hypervisors with incredibly fast boot times and a tiny footprint, as the application and OS are compiled into a single binary.

Hobbyist & Niche Microkernels

Because Rust is so well-suited to the task, the GitHub ecosystem is full of experimental microkernels:

  • Rux: A hobbyist microkernel attempting to replicate the capability-based security architecture of the mathematically verified seL4 microkernel, but utilizing Rust's borrow checker for memory safety[7].

  • LiberSystem: A new experimental microkernel OS based on typed objects and capability-based security, stepping away from the traditional POSIX/Unix "everything is a file" model[8].

  • Aero: A modern, unix-like microkernel written in Rust that focuses on high performance and running modern Linux binaries. 



When looking for the "absolute smallest educational OS" in Rust, the answer usually points to a few distinct open-source tutorial projects and academic kernels. Because educational operating systems are usually built step-by-step, the "smallest" version of these OSes is literally just a few kilobytes of compiled code designed to boot up and print text to a screen.

Here are the most notable, minimal educational operating systems in Rust, ranked by their popularity and use case:

1. The Gold Standard: blog_os ("Writing an OS in Rust")

By far the most famous and widely used educational OS in the Rust ecosystem is Philipp Oppermann’s [1][2].

  • What it is: A step-by-step guide to writing a minimal x86 kernel from scratch.

  • Why it's the "smallest": The tutorial starts with a freestanding #![no_std] Rust binary that skips the standard library[2][3]. In the first few chapters, your entire "OS" is less than 100 lines of code, serving only to clear the screen and write "Hello World" directly into the VGA text buffer[2][3].

  • Link: os.phil-opp.com

  • phil-opp/blog_os: Writing an OS in Rust @GitHub


2. For ARM / Embedded: rust-raspberrypi-OS-tutorials

If you want the smallest possible educational OS that runs on physical hardware (rather than an x86 emulator like QEMU), Andre Richter's tutorial series is phenomenal.

  • What it is: A tutorial series on writing a bare-metal OS for the Raspberry Pi 3 and 4 in Rust.

  • Why it's the "smallest": It strips away all PC legacy cruft (like BIOS and VGA) and starts at the absolute lowest level of hardware interaction. The first iteration of the "OS" doesn't even print text—it just powers on a CPU core and blinks a single LED. From there, it builds up to a basic UART terminal echo.

  • Link: github.com/rust-embedded/rust-raspberrypi-OS-tutorials

3. The University Choice: eduOS-rs

If you are looking for a complete, structured "teaching OS" rather than a blog tutorial, eduOS-rs is the standard[4].

  • What it is: Developed by RWTH Aachen University for their Operating Systems course[4]. It is a heavily stripped-down, monolithic Unix-like OS[4].

  • Design: It borrows concepts from Philipp Oppermann's tutorials and the classic toyos-rs, but it is structured as a university grading tool[4]. Students are given the tiny, incomplete kernel and are tasked with writing the memory allocator, paging system, and task scheduler themselves[4].

  • Link: github.com/RWTH-OS/eduOS-rs (Note: Stanford also briefly ran a famous experimental class called CS140e that built a tiny Rust OS for Raspberry Pi[5]).


  • RWTH-OS/eduOS-rs: A teaching operating system written in Rust @GitHub

4. For Kids & Absolute Beginners: SmileyOS

A newer, highly minimalist project that recently appeared in the ecosystem is SmileyOS[6].

  • What it is: A tiny, bare-metal Rust OS explicitly designed for kids and beginners to learn coding on old 32-bit PCs[6].

  • Design: Unlike the others, which teach you how to build the OS, SmileyOS is a pre-built micro-environment. It features its own kernel, scheduler, and a simple desktop/terminal that runs a tiny custom programming language called "Smilium"[6]. The codebase is intentionally kept small enough that a student can read the entire OS source code end-to-end[6].

Which one should you pick?

  • If you want to learn how to write an OS from scratch: Follow Philipp Oppermann's blog_os[1][2]. It is the most meticulously maintained tutorial in the Rust community[2].

  • If you want to play with hardware: Do the Raspberry Pi OS tutorials.

  • If you want an academic challenge: Look at eduOS-rs[4].



No comments: