Go to file
Chen Chengjun 2b34b10513
Test loongarch64 / basic-test (lint) (push) Failing after 55s Details
Test riscv64 / basic-test (compile) (push) Failing after 56s Details
Test riscv64 / basic-test (lint) (push) Failing after 56s Details
Publish website / build_and_deploy (push) Failing after 59s Details
Test riscv64 / basic-test (usermode_test) (push) Failing after 56s Details
Test AsterNixOS (minimal) / minimal-nixos-test (push) Failing after 1m2s Details
Test riscv64 / integration-test (4, boot-debug-smp4) (push) Failing after 56s Details
Test riscv64 / integration-test (true, 4, conformance-release-smp4) (push) Failing after 56s Details
Test riscv64 / integration-test (true, boot-release) (push) Failing after 57s Details
Test riscv64 / integration-test (true, conformance-release) (push) Failing after 56s Details
Test x86-64 / basic-test (compile) (push) Failing after 58s Details
Test x86-64 / basic-test (ktest) (push) Failing after 56s Details
Test x86-64 / osdk-test (asterinas/asterinas:0.18.0-20260702) (push) Failing after 56s Details
Test x86-64 / basic-test (lint) (push) Failing after 57s Details
Test x86-64 / osdk-test (asterinas/osdk:0.18.0-20260702) (push) Failing after 56s Details
Test x86-64 / basic-test (usermode_test) (push) Failing after 57s Details
Test x86-64 / boot-test (linux-legacy32, 4, legacy32) (push) Failing after 56s Details
Test x86-64 / boot-test (multiboot, 4, multiboot2-smp4) (push) Failing after 56s Details
Test x86-64 / regression-test (linux-efi-handover64, false, handover64-debug) (push) Failing after 56s Details
Test x86-64 / regression-test (multiboot2, 4, multiboot2-smp4) (push) Failing after 56s Details
Test x86-64 / conformance-test (/ext2, blocklists.ext2, false, iommu, gvisor, ext2-iommu-debug) (push) Failing after 56s Details
Test x86-64 / conformance-test (/ext2, blocklists.ext2, false, iommu, kselftest, ext2-iommu-debug) (push) Failing after 56s Details
Test x86-64 / conformance-test (/ext2, blocklists.ext2, false, iommu, ltp, ext2-iommu-debug) (push) Failing after 57s Details
Test x86-64 / conformance-test (/ext2, blocklists.ext2, microvm, gvisor, ext2-microvm) (push) Failing after 56s Details
Test x86-64 / conformance-test (linux-efi-pe64, false, ltp, debug) (push) Failing after 56s Details
Test x86-64 / conformance-test (/ext2, blocklists.ext2, microvm, ltp, ext2-microvm) (push) Failing after 57s Details
Test x86-64 / conformance-test (linux-efi-pe64, false, gvisor, debug) (push) Failing after 57s Details
Test x86-64 / conformance-test (linux-efi-pe64, false, kselftest, debug) (push) Failing after 57s Details
Test x86-64 / conformance-test (/ext2, blocklists.ext2, microvm, kselftest, ext2-microvm) (push) Failing after 57s Details
Test x86-64 / conformance-test (multiboot2, /exfat, false, blocklists.exfat, gvisor, exfat-multiboot2-nokvm) (push) Failing after 56s Details
Test loongarch64 / basic-test (compile) (push) Failing after 1m23s Details
Test x86-64 / conformance-test (multiboot2, /exfat, false, blocklists.exfat, kselftest, exfat-multiboot2-nokvm) (push) Failing after 56s Details
Test riscv64 / basic-test (ktest) (push) Failing after 1m24s Details
Test x86-64 / conformance-test (multiboot2, /exfat, false, blocklists.exfat, ltp, exfat-multiboot2-nokvm) (push) Failing after 56s Details
Test x86-64 / conformance-test (multiboot2, 4, gvisor, multiboot2-smp4) (push) Failing after 57s Details
Test x86-64 / conformance-test (multiboot2, 4, kselftest, multiboot2-smp4) (push) Failing after 57s Details
Test x86-64 / conformance-test (multiboot2, 4, ltp, multiboot2-smp4) (push) Failing after 56s Details
Test x86-64 / xfstests (push) Failing after 56s Details
Validate SCML files with sctrace / validate_scmls (push) Failing after 55s Details
Check licenses / check-license-lines (push) Failing after 3m16s Details
Test x86-64 / cross-compile-test (boot, false, asterinas/asterinas:0.18.0-20260702, arm-cross-boot, ubuntu-24.04-arm) (push) Has been cancelled Details
Close stale issues and PRs / stale (push) Failing after 1m30s Details
Publish API Docs / check_api_docs (push) Failing after 1m2s Details
Add regression tests
2026-07-17 10:09:53 +08:00
.agents/skills/aster-code-review Fix review benchmark guideline snapshot lookup 2026-07-05 18:32:23 -07:00
.claude Add the aster-code-review skill 2026-07-02 18:15:28 -07:00
.devcontainer Switch to a new Docker image 0.18.0-20260702 2026-07-02 10:32:01 -07:00
.github Run aster-code-review from a /aster-code-review PR comment 2026-07-02 18:15:28 -07:00
.vscode Use rust-analyzer for riscv64 and loongarch64 target 2025-08-29 16:57:06 +08:00
book Implement move_mount syscall 2026-07-10 00:49:39 -07:00
distro Add cmdline to disable earlycon 2026-07-04 23:08:32 -07:00
kernel Make fcntl and ioctl use FileCommon 2026-07-17 10:09:53 +08:00
osdk Install claude and codex in docker image and bump to 0.18.0-20260701 2026-07-01 05:16:41 -07:00
ostd Check bounds before adding offsets 2026-07-15 18:09:38 -07:00
test Add regression tests 2026-07-17 10:09:53 +08:00
tools Update linux kernel binary for benchmark 2026-07-14 19:17:57 -07:00
.code-workspace Enable the rust-analyzer for OSDK 2024-04-25 09:44:46 +08:00
.dockerignore Move test/* to test/initramfs/* 2026-01-13 11:53:34 -08:00
.editorconfig Add .editorconfig 2026-05-12 02:39:03 -07:00
.gitignore Redirect serial output if `hvc0` is on 2026-01-28 19:43:55 -08:00
.licenserc.yaml Remove local tdx-guest crate 2024-04-29 10:13:04 +08:00
.typos.toml Add jtreg overlay to AsterNixOS 2026-05-24 22:38:45 -07:00
AGENTS.md Reference the coding guideline indexes instead of copying them 2026-07-03 23:48:32 -07:00
CLAUDE.md Add `AGENTS.md` and `CLAUDE.md` for AI coding agents 2026-03-01 16:29:01 -08:00
CODEOWNERS Keep various things sorted 2026-01-13 00:15:43 -08:00
COPYRIGHT Update the license to MPLv2 2023-12-26 17:43:45 +08:00
Cargo.lock Support virtio-mmio devices from kernel command line 2026-07-03 02:36:10 -07:00
Cargo.toml Replace libflate with zune-inflate for initramfs decompression 2026-06-24 05:40:06 -07:00
Components.toml Add NVMe driver 2026-05-23 02:34:53 -07:00
DOCKER_IMAGE_VERSION Bump gVisor Docker image 2026-07-02 00:06:34 -07:00
LICENSE-MPL Update the license to MPLv2 2023-12-26 17:43:45 +08:00
Makefile Add tests for new mount API 2026-07-10 00:49:39 -07:00
OSDK.toml fix risc-v duplicate output by redirecting serial output, move risc-v scheme to qemus_args.sh for compliance 2026-05-09 16:20:34 +08:00
README.md Switch to a new Docker image 0.18.0-20260702 2026-07-02 10:32:01 -07:00
RELEASES.md Add 0.18.0 release notes 2026-06-04 04:40:36 -07:00
VERSION Bump version to 0.18.0 2026-06-03 07:10:21 -07:00
clippy.toml Enable `clippy::inconsistent_struct_constructor` 2026-06-18 02:10:03 -07:00
rust-toolchain.toml Bump toolchain to nightly-2026-04-03 2026-05-07 19:36:44 -07:00
rustfmt.toml Implement new ioctl infrastructure 2025-12-07 12:01:05 +08:00
triagebot.toml Manage S-waiting-on-author and S-waiting-on-review automatically 2024-10-24 19:12:04 +08:00

README.md

asterinas-logo
Toward a production-grade Linux alternative—memory safe, high-performance, and more

https://github.com/user-attachments/assets/eabf8674-8503-44f7-abcc-52395d2ca4a3

Test x86-64 Test riscv64 Test loongarch64 Test Intel TDX Test AsterNixOS (full) Benchmark x86-64 Benchmark Intel TDX

News:

Congratulations to the Asterinas community🎉🎉🎉

Introducing Asterinas

The future of operating systems (OSes) belongs to Rust—a modern systems programming language (PL) that delivers safety, efficiency, and productivity at once. The open question is not whether OS kernels should transition from C to Rust, but how we get there.

Linux follows an incremental path. While the Rust for Linux project has successfully integrated Rust as an official second PL, this approach faces inherent friction. As a newcomer within a massive C codebase, Rust must often compromise on safety, efficiency, clarity, and ergonomics to maintain compatibility with legacy structures. And while new Rust code can improve what it touches, it cannot retroactively eliminate vulnerabilities in decades of existing C code.

Asterinas takes a clean-slate approach. By building a Linux-compatible, general-purpose OS kernel from the ground up in Rust, we are liberated from the constraints of a legacy C codebase—its interfaces, designs, and assumptions—and from the need to preserve historical compatibility for outdated platforms. Languages—including PLs—shape our way of thinking. Through the lens of a modern PL, Asterinas rethinks and modernizes the construction of OS kernels:

  • Modern architecture. Asterinas pioneers the framekernel architecture, combining monolithic-kernel performance with microkernel-inspired separation. Unsafe Rust is confined to a small, auditable framework called OSTD, while the rest of the kernel is written in safe Rust, keeping the memory-safety TCB intentionally minimal.

  • Modern design. Asterinas learns from Linux's hard-won engineering lessons, but it is not afraid to deviate when the design warrants it. For example, Asterinas improves the CPU scalability of its memory management subsystem with a novel scheme called CortenMM.

  • Modern code. Asterinas's codebase prioritizes safety, clarity, and maintainability. Performance is pursued aggressively, but never by compromising safety guarantees. Readability is treated as a feature, not a luxury, and the codebase is structured to avoid hidden, cross-module coupling.

  • Modern tooling. Asterinas ships a purpose-built toolkit, OSDK, to facilitate building, running, and testing Rust kernels or kernel components. Powered by OSTD, OSDK makes kernel development as easy and fluid as writing a standard Rust application, eliminating the traditional friction of OS engineering.

Asterinas aims to become a production-grade, memory-safe Linux alternative, with performance that matches Linux—and in some scenarios, exceeds it. The project has been under active development for four years, supports 230+ Linux system calls, and has launched an experimental distribution, Asterinas NixOS.

In 2026, our priority is to advance project maturity toward production readiness, specifically targeting standard and confidential virtual machines on x86-64. Looking ahead, we will continue to expand functionality and harden the system for mission-critical deployments in data centers, autonomous vehicles, and embodied AI.

Getting Started

Supported CPU Architectures

Asterinas targets modern, 64-bit platforms only.

A development platform is where you build and test Asterinas (i.e., the host machine running the Docker-based development environment).

Development Platform
x86-64
ARM64

A deployment platform is a CPU architecture that Asterinas can run on as an OS kernel.

Deployment Platform Tier
x86-64 Tier 1
x86-64 (Intel TDX) Tier 2
RISC-V 64 Tier 2
LoongArch 64 Tier 3

Tier definitions:

  • Tier 1: Fully supported and tested. CI runs the full test suite on every PR.
  • Tier 2: Actively developed with basic functionality working. CI runs build checks and basic tests on a regular basis (per PR for RISC-V and nightly for Intel TDX), but the full test suite is not yet covered.
  • Tier 3: Early-stage or experimental. The kernel can boot and perform basic operations, but CI coverage is limited and may not include automated runtime tests for every pull request.

For End Users

We provide Asterinas NixOS ISO Installer to make the Asterinas kernel more accessible for early adopters and enthusiasts. We encourage you to try out Asterinas NixOS and share feedback. Instructions on how to use the ISO installer can be found here.

Disclaimer: Asterinas is an independent, community-led project. Asterinas NixOS is not an official NixOS project and has no affiliation with the NixOS Foundation. No sponsorship or endorsement is implied.

For Kernel Developers

Follow the steps below to get Asterinas up and running.

  1. Download the latest source code on an x86-64 (or ARM64) Linux machine:

    git clone https://github.com/asterinas/asterinas
    
  2. Run a Docker container as the development environment:

    docker run -it --privileged --network=host -v /dev:/dev -v $(pwd)/asterinas:/root/asterinas asterinas/asterinas:0.18.0-20260702
    

    Alternatively, if you use VS Code with the Dev Containers extension, open the cloned folder and select "Reopen in Container".

  3. Inside the container, go to the project folder (/root/asterinas) and run:

    make kernel
    make run_kernel
    

    This results in a VM running the Asterinas kernel with a small initramfs.

  4. To install and test real-world applications on Asterinas, build and run Asterinas NixOS in a VM:

    make nixos
    make run_nixos
    

    This boots into an interactive shell in Asterinas NixOS, where you can use Nix to install and try more packages.

The Book

See The Asterinas Book to learn more about the project.

License

Asterinas's source code and documentation primarily use the Mozilla Public License (MPL), Version 2.0. Select components are under more permissive licenses, detailed here. For the rationales behind the choice of MPL, see here.