Expand description
The runtime owns guest process state and calls generated native code through a stable C ABI.
The guest is an RV64 Linux process. The host is the machine that runs this crate. The runtime maps the guest ELF file, builds its first user stack, and handles a small set of Linux system calls. Generated code uses raw pointers to enter and leave this runtime. Thus, the data layout in this file is also part of the JIT interface.
Structs§
- Compiled
Jit - Owns a callable JIT entry and the artifact that keeps its native code valid.
- Guest
Control - Keeps debugger checks optional so normal generated blocks do not call back into the runtime.
- Guest
Memory - Owns guest pages and maintains the pointer-based view used by compiled regions.
- Guest
Memory Abi - Exposes only stable pointers and lengths because generated code cannot use Rust containers.
- Guest
Page Abi - Keeps the host and generated-code page layout identical across the C ABI.
- Guest
State - Uses one shared layout because both the runtime and generated libraries access guest state.
- Guest
Translation Abi - Caches one guest-to-host translation to avoid a page search on common accesses.
- Imported
Symbol - Retains jump-slot locations so dynamic imports can be connected later.
- JitEntry
Abi - Pairs a guest target with native code for indirect dispatch from generated code.
- JitRuntime
- Uses a lifting callback so this crate does not depend on a specific guest architecture crate.
- Load
Segment - Keeps file and memory sizes separate because ELF load segments can contain zero-filled BSS.
- Page
Perms - Uses Linux protection bits so mapping operations need no second permission model.
- Program
Image - Stores parsed ELF data in a form that the MMU can map without parsing again.
- Program
Symbol - Retains symbol metadata for entry selection and debugger address display.
- Remu
Config - Keeps process and compiler inputs together so snapshots and cache behavior are reproducible.
- Runtime
Snapshot - Saves mutable process data while leaving compiled code available for reuse after restore.
Enums§
- Access
Kind - Distinguishes fault types so the runtime can report the failed guest operation.
- Exit
Reason - Transfers control from generated code to the runtime without unwinding across the ABI.
Functions§
- compile_
jit - Compiles one NNIL region for callers that need an independent entry point.