Asterinas 0.18 Lands: A Rust-Written, Memory-Safe Linux Alternative Targets Containers
#Rust

Asterinas 0.18 Lands: A Rust-Written, Memory-Safe Linux Alternative Targets Containers

Hardware Reporter
6 min read

Asterinas 0.18 pushes its Rust-based, Linux-compatible kernel toward real workloads with a new NVMe driver, a re-implemented EXT2 driver, namespaces, cgroups, and a sharpened focus on running as a guest OS for Kata and Confidential Containers.

Asterinas is one of those projects that keeps showing up in the same conversation as Redox OS whenever someone asks whether a from-scratch, Rust-written operating system can actually compete with Linux instead of just demoing in a VM. With the Asterinas 0.18 release announced last week, the answer is creeping closer to yes, at least for a specific class of workload.

The stated goal has not changed: a production-grade Linux alternative that is memory safe and high performance. What changed in 0.18 is where the developers are spending their effort. This cycle is heavily about making Asterinas a credible guest OS inside virtual machines, specifically for Kata Containers and Confidential Containers.

Twitter image

What Asterinas actually is

If you have only skimmed headlines, it is easy to lump Asterinas in with "Rust in the Linux kernel." It is a different thing. The Linux kernel has started accepting Rust code for drivers and subsystems, but the kernel itself remains a C monolith. Asterinas is written in Rust from the ground up, and it uses an architecture the project calls a framekernel.

The framekernel idea is the interesting part for anyone who has spent years arguing about monolithic versus microkernel trade-offs. A traditional monolithic kernel like Linux runs everything in one privileged address space, which is fast because there are no message-passing boundaries, but a single bad pointer anywhere can corrupt the whole system. A microkernel isolates components into separate protection domains, which is safer but pays a constant tax in inter-process communication overhead.

Asterinas splits the kernel into two parts inside the same address space and at the same privilege level. There is a small Trusted Computing Base (TCB), called the OS Framework, written with unsafe Rust allowed. Everything else, the OS services that implement the actual Linux behavior, is written in safe Rust and is forbidden from using unsafe at all. The compiler enforces the boundary. You get monolithic-style performance because there is no privilege switch between the layers, but memory-safety bugs are confined to a small, auditable framework rather than scattered across hundreds of thousands of lines of driver code. That is the pitch, and it is a genuinely different point in the design space.

The Linux compatibility surface

None of this matters if your existing binaries do not run. Asterinas implements hundreds of Linux system calls and aims for native ABI compatibility, meaning the goal is to run unmodified Linux userspace rather than require a recompile. The 0.18 release widens that surface in ways that matter for real systems.

The headline additions are Linux namespaces and cgroups. Those two features are the foundation of every container runtime, so implementing them is the prerequisite for the Kata and Confidential Containers work. Without namespaces you cannot isolate process trees, mounts, and networking; without cgroups you cannot account for or limit resource usage. Getting both in is what turns "runs a shell" into "can host a container."

On top of that, 0.18 expands VirtIO support, which is exactly what you want when the target deployment is a guest inside a hypervisor. VirtIO is the paravirtualized device interface that lets a guest talk to virtual disks, network cards, and other devices efficiently instead of emulating real hardware. More VirtIO coverage means the OS behaves better under QEMU, KVM, and the VMM layers that Kata uses.

{{IMAGE:2}}

Storage and driver work

For the homelab crowd that judges an OS by whether it can actually move bytes off a disk, the storage updates are the most concrete part of this release.

Asterinas 0.18 ships a new NVMe driver. That is a meaningful line item, because NVMe is the baseline for any modern storage setup, and an OS that only spoke legacy block interfaces would be a non-starter for performance testing on real or virtualized SSDs. Alongside it, the EXT2 file-system driver was re-implemented. EXT2 is not the file system you would run in production, but it is a sensible, well-understood target for a young kernel: simple enough to implement correctly in safe Rust, and useful as a known-good baseline before tackling journaling file systems.

The combination of a fresh NVMe path and a reworked file-system layer is the kind of plumbing that does not make for flashy demos but determines whether you can ever produce trustworthy I/O numbers. I would love to see the project publish throughput and latency figures against a Linux guest on identical VirtIO-backed NVMe, because that head-to-head is the only way to validate the framekernel performance claim. The architecture promises monolithic-class speed; the benchmarks are what will prove it.

Software that now runs

A kernel is only as useful as the software it can host, and Asterinas keeps chipping away at its package compatibility. The latest additions called out for 0.18 include Codex, QEMU, and Firefox. Firefox in particular is a useful stress test, since a modern browser exercises a huge swath of system calls, threading, graphics, and networking behavior all at once. If Firefox runs, a lot of less demanding software will too.

The project also offers a NixOS build that integrates Asterinas, and an Asterinas NixOS x86_64 ISO is available for download from GitHub if you want to boot it in a VM and poke at it yourself. Pairing a reproducible, declarative distribution like NixOS with an experimental kernel is a smart move for testers, since it makes it trivial to rebuild an identical environment when you inevitably hit something that does not work yet.

Build and testing recommendations

This is not an OS to put on bare metal in your rack today, and the developers are not pretending otherwise. The realistic way to evaluate it right now is as a VM guest, which conveniently lines up with the project's own container focus.

If you want to kick the tires, grab the NixOS ISO and boot it under QEMU/KVM with VirtIO devices for disk and network, since that is the path getting the most active development and the most VirtIO coverage in 0.18. Point a virtual NVMe device at it to exercise the new driver, and try the namespaces and cgroups support if you are interested in the container angle. Keep expectations calibrated: this is a 0.x release of a clean-room kernel, and the value here is in watching the architecture mature, not in deploying workloads.

Development continues to be sponsored by Ant Group, Intel, and several Chinese universities, which gives the project more institutional backing than most hobby kernels ever see. The deeper story across both Asterinas and Redox is that Rust operating systems have moved past the proof-of-concept stage and are now grinding through the unglamorous work of drivers, file systems, and ABI compatibility. That grind is exactly what separates a research toy from something you might one day run, and 0.18 is several steps further down that road. Full details are in the v0.18 announcement for anyone who wants the complete changelog.

Comments

Loading comments...