Skip to main content

Module cache

Module cache 

Source
Expand description

Artifact resolution, pinned HTTPS download with SHA-256 verification, native kwpatch unpacking, and version-keyed .cwasm AOT precompilation cache.

Structs§

ResolvedArtifacts
Resolved kernel + initrd + cmdline + datadisk template + distro disk ready to boot.

Constants§

DEFAULT_ALPINE_SHA256
Expected SHA-256 of alpine.erofs for DEFAULT_UNKERNEL_VERSION.
DEFAULT_BUNDLE_SHA256
Expected SHA-256 of unkernel.wasm for DEFAULT_UNKERNEL_VERSION.
DEFAULT_SMP_SHA256
Expected SHA-256 of the unpacked SMP kernel for DEFAULT_UNKERNEL_VERSION.
DEFAULT_UNKERNEL_VERSION
Pinned upstream unkernel release verified with this host ABI.

Functions§

default_cache_dir
Default cache root ($UNKERNEL_RS_CACHE_DIR -> $XDG_CACHE_HOME/unkernel-rs -> ~/.cache/unkernel-rs -> %LOCALAPPDATA%\unkernel-rs\cache).
prepare_artifacts
Load (or unpack + Cranelift-compile + cache) the SMP Wasm module, initrd, cmdline, and distro.
resolve_bundle_path
Ensure unkernel.wasm is present locally (reusing explicit path, env override, or cache, or downloading pinned version over HTTPS if offline == false).
resolve_distro_path
Ensure the named distro image (alpine, debian, etc.) is available locally.
sha256_file
sha256_hex