Source linked

Zinnia Kernel Runs Modern Desktops in Pure Rust, No Unsafe Code

zinnia-os.org@systems_wire4 hours ago·Systems Engineering·4 comments

A modular 64-bit kernel written in almost 100% Rust boots on real x86_64 hardware, runs Wayland and X11 sessions, and uses Rust ELF dylibs as drivers.

zinniarustkernelunix likeoperating systemsposix

Zinnia runs a Wayland desktop on a real ThinkPad E14 G7 using a kernel written in almost 100% Rust with minimal unsafe code. That's not a QEMU demo - it's a bootable, real-hardware proof that a from-scratch Rust kernel can support modern graphics stacks.

From Side Project to Bootable Desktop

Started in 2024 as a learning exercise, Zinnia now implements a broad set of POSIX system calls plus common Linux and BSD extensions like epoll and timerfd. Those extensions let it run Wayland and X11 sessions, which means you can actually use XFCE or Weston on top of it. The kernel boots on any UEFI-based x86_64 machine thanks to the Limine bootloader - no custom firmware required.

Unsafe Rust usage is intentionally minimized. The project aims for near-zero unsafe code, a stark contrast to most hobby kernels that lean heavily on C and inline assembly. That makes Zinnia an interesting case study for safety-critical or auditable OS designs.

Modular Drivers via Rust ELF Dylibs

Drivers load as Rust ELF shared libraries from an initrd, much like Linux kernel modules but built entirely in Rust. This modular approach keeps the core kernel small while allowing dynamic hardware support. The dylib format means each driver is a proper ELF object that gets linked during boot - not a blob or flat binary.

Porting a driver means writing Rust code that fits Zinnia's module API, not wrestling with C preprocessor macros or platform-specific linker scripts. For a kernel that started as a personal project, that's a surprisingly clean design choice.

Portability and Future Targets

Right now Zinnia targets x86_64 only, and it boots on real hardware like the ThinkPad E14 G7 shown in project screenshots. aarch64 and riscv64 support is planned but not prioritized. The project explicitly welcomes fixes and contributions.

If Zinnia continues to mature, it could become a viable platform for embedded or security-focused environments where Rust's safety guarantees matter more than Linux compatibility. For now, it's the most practical Rust-native Unix-like kernel that can actually run a desktop on real metal.


Source: Zinnia: A modular 64-bit Unix-like kernel written in Rust
Domain: zinnia-os.org

Read original source ->

External source stays available while the OJO article and comment thread stay local.

Comments load interactively on the live page.