Skip to main content

Crate jit

Crate jit 

Source
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§

CompiledJit
Owns a callable JIT entry and the artifact that keeps its native code valid.
GuestControl
Keeps debugger checks optional so normal generated blocks do not call back into the runtime.
GuestMemory
Owns guest pages and maintains the pointer-based view used by compiled regions.
GuestMemoryAbi
Exposes only stable pointers and lengths because generated code cannot use Rust containers.
GuestPageAbi
Keeps the host and generated-code page layout identical across the C ABI.
GuestState
Uses one shared layout because both the runtime and generated libraries access guest state.
GuestTranslationAbi
Caches one guest-to-host translation to avoid a page search on common accesses.
ImportedSymbol
Retains jump-slot locations so dynamic imports can be connected later.
JitEntryAbi
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.
LoadSegment
Keeps file and memory sizes separate because ELF load segments can contain zero-filled BSS.
PagePerms
Uses Linux protection bits so mapping operations need no second permission model.
ProgramImage
Stores parsed ELF data in a form that the MMU can map without parsing again.
ProgramSymbol
Retains symbol metadata for entry selection and debugger address display.
RemuConfig
Keeps process and compiler inputs together so snapshots and cache behavior are reproducible.
RuntimeSnapshot
Saves mutable process data while leaving compiled code available for reuse after restore.

Enums§

AccessKind
Distinguishes fault types so the runtime can report the failed guest operation.
ExitReason
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.