Expand description
Generic nub guest-kernel library for Hyperlight.
Houses the personality seam (personality), the CALL/HALT task
loop (task), the generic RPC bodies + register_guest_kernel!
(guest_fns), and the bare-metal substrate modules (page tables,
JIT runtime, page allocator, ring-3 entry, segments). This crate
produces no binaries: a personality crate (e.g.
rust/javm-guest-x86, the Javm personality) plugs its state/cap
system into the seam and owns the [[bin]] targets.
Downstream personality-crate requirements:
- a direct, unrenamed
hyperlight-guest-bindependency (register_guest_kernel!expands#[guest_function]attrs whose proc-macro resolves the crate by package name at the invoking crate) plusextern crate alloc;andextern crate hyperlight_guest_bin;at its lib root; - its own
link.xnext to its manifest —nub_build::buildresolves the linker script asmanifest_dir.join("link.x"); copyrust/javm-guest-x86/link.x(canonical script until nub-build grows an explicit link-script parameter); - a
heap-diag = ["nub-arch-x86/heap-diag"]feature — the macro-stampednub_heap_statswrapper’s#[cfg(feature = "heap-diag")]resolves against the invoking crate.
Guest modules are gated on cfg(target_os = "none") so the lib
also compiles on host targets — host code imports the test_abi
module for FN_ID constants without dragging in any bare-metal
deps.
Modules§
- test_
abi - FN_ID constants shared between the test/bench guest binaries and host-side test/bench drivers. Always compiled — host-visible. FN_ID constants for personality-independent test/bench guest probes.