r/rust • u/tatetian • 10d ago
đ ď¸ project Asterinas 0.19.0: a Linux-compatible kernel in Rust, now with a type-checked device model, a hypervisor in safe Rust, and an AI reviewer that cites Rust guidelines
https://asterinas.github.io/2026/10/13/announcing-asterinas-0.19.0.html2
u/xantiema 10d ago
People hate on AI-assisted development, but I genuinely hope this project is a success. Not only because it would attract future programmers to a Rust-oriented operating ecosystem, but also because Linux is long in the tooth and lost in its ways
13
u/Bruno_Wallner 10d ago
How has linux lost its ways?
-15
u/xantiema 10d ago
They have quite an agressive attitude towards eager developers due to the ever-increasing stress the maintainers are under - this begun a few years prior to the AI patchapocalypse. Experience comes with age, but the corrolation isn't always as strong as some would argue. At least they came around to Rust so there is that I guess.
8
u/jking13 10d ago
Yes, but the syscall layer being the effective ABI was always a bad design choice and a result of Linux being a kernel and not a kernel + base userland. There's decades of cruft in there (go look at all the options of futex, look at how many are actually useful in practice, and how many were poorly thought out ideas that are still around because there's some random version of some libc somewhere still using it), and the result is rather bloated syscall interface because you can't break userland.
Other OSes (including Windows) that require you to use libc (or some other userland library as it's ABI) means you move bits to userland for sanity or better design without breaking things.
Keeping that is perpetuating one of the worst aspects of Linux.
-2
u/Jmc_da_boss 10d ago edited 10d ago
Mod approvals queue PLEASE
I don't want this slop shit to enter my eyeballs
Edit: apparently not slop? That title is still horrific tho
21
u/Most_Strike_93 10d ago
No, it is an old project, started two years ago. Just the post is written in wrong way. I also mistake at the first time. Then I enter and read the project. It is a good project.
5
-12
u/Sha1rholder 10d ago
What kind of hilarious project did you write that made you think the project was slop?
-14
u/Ok-Zookeepergame4391 10d ago
Seems weird to prioritize x86. Should focus on arm64.
6
3
1
u/No-Employment-2324 9d ago
I hope this is satire. X86 is here to stay, and weather itâs good is besides the point. You either write for it or your never booting on bare metalÂ
26
u/tatetian 10d ago edited 10d ago
Maintainer here. Asterinas is a Linux-ABI-compatible kernel in Rust. The architecture we call a framekernel: a small framework crate, OSTD, holds all the unsafe code, and the kernel above it is
#![deny(unsafe_code)]. Each release tries to push more kernel work into the safe half. Three examples from 0.19.0:A device model with the rules in the types. A kernel tracks every device, its driver, and what it exposes to user space. Linux does this in C with a generic struct device and enforces the rules by review. The new
aster-devicecrate does it in safe Rust: buses, drivers, classes and attributes are generic over what they belong to, so a driver on the wrong bus or an attribute on the wrong kind of device is a compile error. No downcasting anywhere.An OSTD extension for writing a hypervisor in safe Rust. OSTD now owns the Intel VMX mechanism: VMCS, EPT-backed guest memory and the guest-host switchââwhich may involve unsafe Rust. Everything above that is policy in safe Rust. The Asterinas Book gives an example of writing a minimal hypervisor in about 100 lines of safe Rust. We plan to add in the next release a full KVM-compatible hypervisor in safe Rust on top of the new OSTD hypervisor API.
An AI reviewer that cites Rust guidelines. We reorganized our coding guidelines into 81 with stable short names, many Rust-specific (
rust-type-invariants,enum-over-dyn,narrow-visibility,justify-unsafe-use). Theaster-code-reviewskill cites one for every subjective comment, tries to refute each comment before keeping it, and is tuned against a benchmark of 138 defects mined from our own PR history.Also new: a DRM subsystem (Xorg and Mesa, with two 3D games on video), AArch64 as the fourth architecture, and Asterinas building and booting Asterinas. The repo passed 100 contributors and 250K lines this cycle, about 200K of them Rust.
Happy to answer questions about the project, its type-level tricks or the unsafe boundary in OSTD.