Skip to main content

Crate subsoil

Crate subsoil 

Source
Expand description

Guest-side runtime support library for JAVM chain Images.

Provides compiler builtins (memset, memcpy, memcmp), a panic handler, and a default trap _start (so guests link without defining one themselves).

Guests declare their entry points via the #[subsoil::endpoint(N)] attribute (from subsoil-derive). Each annotation emits a per-endpoint trampoline that calls the user fn and halts; the kernel enters trampolines via endpoints[N].entry_pc. _start (PC=0) is never an intended entry — it traps via unimp if ever reached.

All freestanding-only symbols are gated behind cfg(target_os = "none") — on host this crate is empty. Services force-link it via use subsoil as _;.

Structs§

EndpointDescriptor
Descriptor written into the .subsoil.endpoints ELF section by the endpoint attribute macro. The JAVM transpiler reads this section at link time and uses each entry to populate the chain Image’s endpoints: BTreeMap<u8, EndpointDef> field.

Attribute Macros§

endpoint
Mark a function as endpoint N of a JAR chain Image.