HeadlinesBriefing favicon HeadlinesBriefing.com

Linux 0.11 Rewritten in Rust

Hacker News •
×

A project has rewritten the Linux 0.11 kernel from scratch in modern Rust, named `linux-0.11-rs`. It maintains the original system's functionality while improving its expression through stronger types and idiomatic abstractions. The rewritten kernel successfully boots on emulated i386 hardware within QEMU and runs a full userland stack, including an init process, shell, and over 60 coreutils.

The project includes a Rust user-space library, `user_lib`, which mirrors the structure of Rust's standard library, allowing user programs to be written more naturally. The userland features a POSIX-subset shell with advanced capabilities like pipelines, control flow, globbing, and an interactive line editor with tab completion. Building a bootable disk image is simplified to a single command.

Key components include the kernel itself, the `user_lib`, user programs comprising coreutils and the shell, and an end-to-end testing framework. The project also offers companion image tools, `mbrkit` and `miniximg`, and provides a development container for an easy setup. The kernel is largely feature-complete compared to the original Linux 0.11, with ongoing work focused on polish and tooling.