Expand description
Nub: the JAR v3 microkernel — uniform caller-facing handle.
The Nub handle is the API callers (chain runtime, tests, RPC,
jar-apply) link against. It hides the choice of substrate behind
a single invoke surface, dispatching to one of two backends:
- Local: runs the byte-PVM interpreter directly in-process via
nub_arch_local::run_instance. Used for tests, deterministic replay, and any host that doesn’t need real ring-0 isolation. - Hyperlight: ships the invocation as an RPC into a
nub-arch-x86guest binary running inside a Hyperlight sandbox. The actualKernel<HyperlightArch>lives guest-side; the host holds only the sandbox + a state cache.
Both backends share the same typed publish/invoke surface — the
caller publishes a Cap::Image (and optionally a Cap::CNode),
publishes a Cap::Instance referencing them, and then invokes by
the resulting instance hash.
Structs§
- Instance
Ref - Opaque, 32-byte handle to an Instance held by an
Arch. - Invocation
Result - Invocation result. Both backends produce this shape on completion; rkyv-archived on the wire from the cached path’s response.
- Invoke
Options - Per-invocation knobs. Empty for the skeleton; fields will land as the kernel grows (gas budget overrides, quota budget, tracing, reentrancy depth limits, …).
- Invoke
Outcome - Result of a successful invocation. Extensible — fields land as needed (gas remaining, post-invocation cap hash, host-call trace, …). For the skeleton we expose only the JAVM HALT return value and gas used.
- Nub
- Uniform handle to the nub microkernel.
Type Aliases§
- AbiCap
Hash - 32-byte Cap::Instance identity hash. Matches
javm_cap::CapHashbyte-wise (kept as a local alias here sonub-arch-x86-abistays free of the javm-cap dependency, which pulls inalloc::collectionsetc.). - CapHash
- 32-byte content hash. Same shape as
javm_cap::CapHash; defined here locally so this crate staysno_std. A future unification pass will share the type oncejavm-capbecomesno_std-clean.