Repository navigation
v0.13.0
0.13.0 is a ground-up rewrite of the project since 0.12.1: a single hluk CLI plus a library, a typed guest-to-host boundary, one reproducible embedded Unikraft kernel, and a formal runtime support-tier policy. It is not CLI- or API-compatible with 0.12.x; see Removed and the behavioral notes under Changed.
Added
- Single
hlukCLI with subcommandsrun,snapshot save/snapshot run, andbench(cold/cold-snap/warm-restore/warm-stateful/parallel). Flags:--mount HOST:GUEST[:ro],--net/--net-allow/--net-block/--port,--exec,--guest-exec(urunc-style, runs a binary baked into the initrd),--entry,--env KEY=VALUE, and--scratch-mb. - Library API: a
SandboxBuilder—from_initrd(rootfs)/from_kernel/from_snapshot, then.boot()to get a running sandbox — plus therundispatch call,Mount,Exec,GuestConfig, and re-exportedSnapshot/OciTag.hlukis built on the same API. - 11 guest runtimes on a 3-tier support policy (
docs/guest-support-tiers.md), a shared C driver toolkit, and a CPython conformance suite..NETruns both ahead-of-time (AOT) and in-guest JIT (Roslyn source compilation). - Typed
fs_*/net_*host functions with new filesystem operations (rename,symlink,readlink, hardlink,chmod), multi-mount support,net_resolve(host DNS), real guest stdin (ReadStdin+ EOF), and host environment-variable passthrough (--env, re-applied across snapshot restore). --kernel <path>(advanced) to boot an external kernel instead of the embedded one, and a reproducible native-kernel test fixture (just build-native-kernel/just verify-native-kernel).- Snapshot save/restore as OCI-layout directories; macOS (
hvf) support; parallel multi-VM benchmarking; on-demand Windows surrogates.
Changed
- Guest-to-host boundary: a single JSON-RPC
__dispatchfunction plus a host-sideToolRegistrybecame many small, typed FlatBuffer host functions returning real-errno(Linux numbers, with a Win32/Winsock-to-Linux translation table). - Boot metadata: pushed as magic-tagged TLVs prepended to the initrd became pulled via host functions at boot (
GetCmdLine,GetInitrdBase/Size,GetWallClockNs,GetEnvVars, …), re-answerable after a snapshot restore. - Filesystem sandbox: a hand-rolled path resolver became
cap-stdwith kernel-enforcedopenat2(RESOLVE_BENEATH)on Linux (component-by-component resolution on Windows). Networking: blockingsocket2became non-blockingrustixwith anet_pollreadiness model. - Guest memory: a no-paging design with a bespoke
lib/cpiovfsandlib/ukmmapbecame the standard Unikraft paging/vmem/mmap stack with a ramfs initrd. - Kernel provisioning: per-example
kraftbuilds became one reproducible, Docker-built Unikraft kernel embedded in the binary viainclude_bytes!and verified in CI (kraftkit dropped). - VMM:
hyperlight-host0.16 to 0.17. On Linux the default build is KVM-only (for the fastMADV_DONTNEEDsnapshot-restore path); MSHV support is behind--features mshv. - Behavioral (breaking): in 0.12.x
--portimplied--net; now--portrequires an explicit--net(or--net-allow/--net-block) and errors on its own. Under--net, the defaultAllowAllpolicy permits the host loopback interface (needed for intra-guest server+client patterns);--net-allow/--net-blockstill block loopback. - PowerShell runtime moved from a 7.6.x tarball to the 7.4 (LTS) Alpine image.
- The Unikraft kernel is now embedded by default (0.12.x took a positional kernel path); use
--kernelto override it.
Removed
- Wasm custom host tools (
--tool,--tool-wasi-*), the publicToolRegistry/SandboxBuilder::tool()extension API, and the WASIp1 host-function sandbox. - The
pyhlPython tool (image pull from GHCR, warm-then-snapshot,--deterministic) and themultifn-test/pydriver-rundev binaries; the snapshot workflow folded intohluk snapshot. - The
--memory/--stackknobs (replaced by--scratch-mb), the reserved-mountpoint rejection list (/,/bin,/dev,/proc,/sys,/usr), and the implicit default/hostmount path (mounts now require an explicit guest path). - Kernel-internal: the bespoke
lib/cpiovfs, the/dev/hcalluserspace device, the per-syscall TSC profiler, and the trace ports. File-backedmmapand demand paging move from the customlib/ukmmap/cow.cto the standardukvmemfault handler. (mmap'smremapis currentlyENOSYS; glibc tolerates it.) - The
app-elfloaderandkraftkitforks; the platform builds against upstreamapp-elfloaderand a singleunikraftkernel fork. - Docs: the old
host_functions.md(dispatch wire format / attack surface) andpython-packages.md.
Fixed
- Host-mount path-escape resolution is now OS-enforced (
openat2RESOLVE_BENEATH/RESOLVE_NO_MAGICLINKSon Linux; component-by-component on Windows), with defense-in-depth:roenforcement on both the VFS and host sides. - Guest output is captured via a
HostPrinthost function (one VM exit per buffer instead of per byte) and exposed programmatically throughGuestConfig::drain_output.
Pull requests
- @jsturtevant made their first contribution in #110
- @cmainas made their first contribution in #113
Full Changelog: v0.12.1...v0.13.0