An Operating System as a Container Runtime.
Cyrius is a container-focused operating system that runs OCI containers natively, without depending on the Linux kernel. Cyrius treats containers as first-class OS entities and manages their lifecycle and isolation directly.
For implementation-oriented documentation and code-level explanations, see DeepWiki: https://deepwiki.com/n4mlz/Cyrius
Cyrius is a Type-1 container runtime OS: a container runtime integrated into the kernel and running directly on bare metal. By “Type-1,” we mean the runtime lives in kernel mode as part of the OS itself (analogous to a Type-1 hypervisor), not as a user-space process on top of another OS. It is OCI-compatible, does not depend on Linux kernel code, and treats the container environment as a first-class OS object with OS-owned lifecycle and state. Processes run inside explicit environments rather than inheriting isolation as process-attached attributes.
| Hypervisor | Container Runtime | |
|---|---|---|
| Type-1 (kernel space) | Type-1 Hypervisor (VMware ESXi) | Type-1 Container Runtime (Cyrius) |
| Type-2 (user land) | Type-2 Hypervisor (QEMU, VirtualBox) | Type-2 Container Runtime (runc, youki) |
Rust toolchain:
nightly-2025-09-04rust-src, rustfmt, clippy, llvm-tools-previewx86_64-unknown-none, x86_64-unknown-uefiRuntime:
qemu-system-x86_64Optional (for preparing OCI bundles on your development machine):
skopeoumoci$ cargo xtask run --releaseThe following example shows a typical flow:
This project includes a helper script that creates an OCI bundle. It expects ./mnt to contain busybox.tar.
$ ./make_bundle.sh
Getting image source signatures
Copying blob 5bfa213ad291 done |
Copying config ff7d91a4de done |
Writing manifest to image destination$ cargo xtask run --release
(omitted)
INFO : Jumping to kernel entry point at VirtAddr(0x100000a5d10)
[blk] discovered 1 virtio block device(s)
[net] discovered 1 virtio network device(s)
[vfs] mounted FAT32 at /mnt from virtio-blk0 (1163002 blocks)
[kernel] scheduler started
_____ _
/ ____| (_)
| | _ _ _ __ _ _ _ ___
| | | | | | '__| | | | / __|
| |___| |_| | | | | |_| \__ \
\_____|\__, |_| |_|\__,_|___/
__/ |
|___/
[timer] first tick
[web] echo server listening on 0.0.0.0:12345
[shell] ready; type `help` for command listIn the Cyrius shell:
…This repository uses cargo xtask to keep build, run, and test workflows consistent.
Common commands:
# Run (release)
$ cargo xtask run --release
# Test
$ cargo xtask testIf you are new to this codebase, start with:
cargo xtask run)Cyrius is motivated by practical friction points that appear when containers are represented as “processes with attributes”:
Cyrius aims to make the container environment a durable, OS-managed entity rather than an emergent property of a running process.
Containers are first-class OS objects
A container is an explicit entity representing an execution environment. The OS tracks its lifecycle and state.
Environment-first model
Creating an environment and starting a process within it are separate steps (“create then start”).
Minimal host interface, container-native operations
The host-side interface focuses on container management (create/start/stop), avoiding long chains of low-level setup steps.
Compatibility where it matters
Cyrius targets Linux syscall compatibility sufficient for typical container workloads, but does not aim for full Linux feature parity.
Deliberate scope constraints
Cyrius assumes a two-world model (host world and container world) and does not treat nested containers as a primary goal.
Cyrius proposes a container OS model where the container runtime is integrated into the kernel and isolation is enforced by OS-native mechanisms rather than layered user-space conventions. The model assumes containers do not nest and divides the system into two worlds: the host world and the container world. Namespaces are not hierarchical.
All processes are classified as host processes or container processes. Cyrius keeps two syscall tables: one for host control and one for Linux-compatible container execution. The kernel selects the table by inspecting the abi field of the Process structure. Host syscalls are intentionally narrow and focus on OCI-native operations such as create, start, and stop, reducing round-trips between kernel and user space during container setup.
Containers are kernel objects whose state and lifecycle are owned by the OS. A Container defines the execution environment and does not necessarily require any running process. The Container structure holds environment descriptors such as rootfs, capabilities, resource limits, and mount/handle references for inter-process and root filesystem access.
VFS instances for containers are fully separated from the host filesystem. Processes can access VFS only through their associated Container, preventing chroot-style escape patterns by construction and avoiding complex operations like pivot_root to swap filesystem roots.
Cyrius is licensed under the Apache License 2.0. See LICENSE for details.
No open issues yet, or sync has not completed.