A student from China has rewritten an early version of Linux in Rust from scratch. The project, named linux-0.11-rs, reproduces the capabilities of the Linux 0.11 kernel released in late 1991. The new system boots on an emulated i386 computer, launches a command shell, and lets a user work with files and basic programs.
Written Anew, Not Translated Line by Line
The project’s author goes by the pseudonym Poseidon and studies at Beihang University in Beijing. Rather than transliterating Linux’s C source code line by line, he wrote the system afresh while preserving the core principles of the old kernel.
For that reason, linux-0.11-rs cannot be called a fork of modern Linux. The project contains no contemporary kernel, no drivers for today’s hardware, and none of the decades of changes accumulated since the early 1990s. Its foundation is version 0.11, which appeared just a few months after Linux’s first public release.
What Linux 0.11 Was in 1991
Linus Torvalds published Linux 0.11 on December 8, 1991. In his accompanying message, he wrote that the version had received many fixes and ran stably, at least on his own computer. The system booted from floppy disks, supported hard drives and the Minix file system, and launched a command shell with superuser privileges.
At that point, Linux was still a small, experimental project for Intel 386 machines. It had no modern graphical interfaces, no network services, and no broad hardware support. Nevertheless, version 0.11 already allowed a user to install the system on a hard drive, create a file system, mount partitions, and run user programs.
What the Rust Reimplementation Preserves
The new implementation retains many of the original’s capabilities. The kernel manages processes, virtual memory, and signals. Moreover, it supports the Minix v1 file system, ATA hard drives, text output through VGA, a PS/2 keyboard, a serial console, and the full set of Linux 0.11 system calls. The only major component the author deliberately declined to port was floppy-drive handling.
A Larger Codebase Than the Original
The Rust version turned out noticeably larger than the original kernel. According to an automated analyzer, the whole repository holds roughly 47,000 lines of code. About 15,000 belong to the kernel itself, while the remainder comprises libraries, build tools, and programs that run inside the system.
The size grew not only because of Rust’s characteristics. The author did not confine himself to the kernel alone; he also added a full user environment. After booting, the system launches the init process, opens a command shell, and provides dozens of familiar utilities for working with files, directories, and text.
A Full Userland: 80+ Utilities and a Custom Shell
The repository contains more than 80 programs reminiscent of standard Unix utilities. Among them are commands for browsing directories, copying and deleting files, processing text, and managing processes. The author also wrote his own shell, complete with pipelines, variables, conditionals, loops, functions, command substitution, history, and Tab-key autocompletion.
A separate library, structured much like Rust’s standard library, was prepared for user programs. Thanks to it, applications can reach files, the environment, processes, and time through interfaces familiar to developers, instead of calling kernel system functions directly.
Built for QEMU, With Automated Tests
The system targets not a real computer but the QEMU emulator, which reproduces the workings of an old 32-bit i386 processor and its compatible hardware. After building, the user receives a bootable disk image that can be launched with a single command.
The project also includes automated tests. They run the kernel in QEMU, connect to the serial console, and verify commands using prepared scripts. This confirms that the system boots, the shell accepts commands, and individual functions keep working after code changes.
An Openly Educational Effort
The author does not hide the study-oriented nature of the work. In the repository description, he references the Linux 0.11 source code and the rCore teaching project devoted to building operating systems in Rust. In the future, Poseidon plans to prepare a detailed guide for assembling the system from the ground up.
Why Rust
Rust was no accidental choice. The language allows memory to be controlled almost as precisely as C, yet it checks many potentially dangerous operations at compile time. Its type system helps prevent access to already-freed memory, the use of invalid references, and the simultaneous modification of the same data from several parts of a program.
Such properties prove especially useful in kernel development, where a memory error can crash not just one program but the entire system. However, Rust does not spare the developer every problem. Low-level code still requires unsafe operations to configure memory, handle interrupts, and work directly with hardware.
What the Project Is and Is Not
linux-0.11-rs does not show what a modern Linux fully rewritten in Rust would look like. Between version 0.11 and today’s kernel lie decades of development, millions of lines of code, thousands of drivers, and support for many processor architectures.
Rewriting a current Linux from scratch by a single person is practically impossible. Even faithfully reproducing its behavior would require recreating an enormous number of internal interfaces, hardware quirks, and compatibility with existing programs.
With the early kernel, the task looks far more realistic. Linux 0.11 is small enough for one developer to grasp its structure, yet it already contains the essential parts of a full operating system: a process scheduler, memory management, a file system, drivers, and system calls.
Two Eras of Systems Programming, Side by Side
Thanks to this, the project allows a comparison of two approaches to systems programming. The original kernel was created in C and assembly for early-1990s hardware. The new version uses Rust, a stricter module structure, and modern build tools, while still reproducing the behavior of the old system.
The author did not aim for an exact match of the code. He preserved the functions of Linux 0.11 but reworked the internal organization and used types and abstractions characteristic of Rust. Therefore, linux-0.11-rs is an independent implementation rather than a mechanical translation.
No Connection to the AI Debate Just Coincidental Timing
The project also bears no direct relation to the recent dispute over artificial intelligence and Linux development. Its publication merely coincided with yet another heated discussion about the place code created with the help of language models should occupy in open projects.
The repository offers no precise account of how much of the code was written with AI. The large number of sequential changes, the custom tests, the user library, the shell, and the documentation all show that the work did not amount to a single automated generation. Even so, individual sections could well have been created or edited with software assistants.
A Learning Tool, Not a Production System
No one proposes using linux-0.11-rs in real devices. The system works only in a specially prepared emulated environment, reproduces the capabilities of a kernel more than 34 years old, and is not designed to protect modern data or connect to current hardware.
The project’s value lies elsewhere. It offers a chance to study the structure of an operating system through a comparatively small example, to see how Linux’s old solutions can be expressed with Rust, and to walk the entire path from bootloader to command shell independently.
Torvalds, too, created the first version of Linux as a student experiment. In 1991, the project visible in the early kernel history ran only on a limited set of computers and made no claim to becoming the foundation for servers, smartphones, and supercomputers. linux-0.11-rs is unlikely to repeat its later fate, but it continues the same tradition: dismantling complex systems, writing one’s own implementations, and learning from working code.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.