Developers
Build and run AriCodeOS
Everything goes through cargo xtask: building the loader and the kernel, assembling the image, booting QEMU with OVMF and running the scenario suite.
Requirements
A Debian 13 workstation
rust-toolchain.toml pins the Rust version and adds the x86_64-unknown-none and x86_64-unknown-uefi targets automatically.
sudo apt install qemu-system-x86 ovmf nasm clang lld gdb git make
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown # example WebAssembly modulescargo xtask
Everyday commands
Add --debug to any command to use the development profile.
cargo xtask build # AriBoot and AriKernel (release)
cargo xtask image # ESP with BOOTX64.EFI, kernel and initrd
cargo xtask run # QEMU + OVMF, serial console in the terminal
cargo xtask run --cmdline shell # interactive shell (arish)
cargo xtask run --cmdline gui # compositor with two test windows
cargo xtask run --cpus 4 # four processors (SMP)
cargo xtask test # unit tests + boot smoke test
cargo xtask test --all # every QEMU scenario; required before main
cargo xtask test --all --cpus 4 # the whole suite as an SMP stress test
cargo xtask check # rustfmt --check + clippy -D warningsSDK
Write a program
An AriCodeOS program is a static ring 3 ELF loaded at 0x400000 that can only do what its handles allow. aricode-rt provides the entry point, a heap, the panic handler and the system call wrappers.
#![no_std]
#![no_main]
use aricode_rt::sys;
fn main(arg: u64) -> u64 {
sys::print(b"hello\n");
0 // exit code
}
aricode_rt::entry!(main);name = hello_app
caps = system, fs
memory = 128K
read_files = hola.txt
# launched from the shell:
# ari> run hello_app 7Tests
290 scenarios that boot the real system
Every no_std library has unit tests on the host. Integration scenarios are TOML files: QEMU boots without a screen, the serial output is captured and each scenario requires lines such as ARICODEOS_KERNEL_READY, forbids KERNEL PANIC and checks the exit code. Fault scenarios inject truncated ELF files, missing kernels, panics and power cuts in the middle of a write. A parallel runner takes the whole suite, on 1 and 4 CPUs, in about twelve minutes (ADR 0040).
Repository
Where things are
- boot/ — AriBoot, the UEFI loader
- kernel/ — AriKernel, an ELF64 in the upper half
- boot-protocol/ — the BootInfo ABI shared by loader and kernel
- libs/ — 49 no_std libraries with host tests
- desktop/ — the desktop’s signed applications: launcher, terminal, editor, files and settings
- services/ — init, drivers, AriFS, network, compositor, shell, sshd
- sdk/ — ABI, syscall wrappers, IPC protocols and runtime
- apps/ — example applications, the installer and the updater
- tests/qemu/ — declarative integration scenarios
- docs/ — architecture, decisions, audits and incidents