How youki-dev/youki works
Project Type and Purpose
• youki is a systems‐level, open-source container runtime written in Rust. It implements the OCI runtime-spec (like runc), providing CLI commands to create, start, stop, and delete containers, and a set of Rust libraries to handle cgroups, namespaces, rootfs mounting, seccomp filters, and optional WebAssembly workloads.
File-Structure Analysis
Top-level crates/ modules:
• crates/libcgroups – a library abstracting cgroup v1/v2 controllers, with both direct FS and systemd/DBus backends.
• crates/libcontainer – the heart of container construction and lifecycle: builders for namespaces, capabilities, mounts, seccomp, rootfs, etc.
• crates/liboci-cli – a thin library parsing OCI spec JSON, providing the CLI command definitions (create, start, delete, state, exec, etc.).
• crates/youki – the binary glue that wires liboci-cli + libcontainer + libcgroups into the youki CLI executable; also implements workload executors (native process, WasmEdge, Wasmer, Wasmtime).
Other areas:
– scripts/ and justfile – automation of builds, tests, releases.
– tests/ – e2e/integration tests, contest framework, OCI-runtime-tests, etc.
– experiment/ – playgrounds for seccomp or SELinux prototypes.
– CI configs (.github/workflows/**/*.yml), devcontainer, Vagrantfile, cross (multi-arch build).
README Insights
• Confirms youki’s goal: a safe, fast, low-overhead OCI runtime in Rust.
• Points to an architecture SVG in docs.
• Describes command-line usage, system dependencies (libseccomp, systemd, DBus), and supported features (rootless, WebAssembly workloads, cgroup managers).