Expand description
In-process Arch impl: simulates the CPU + MMU substrate with
Rust data structures. Runs directly in the host process; no
sandbox, no cross-compilation.
Personality-agnostic: run_program takes a prepared
ProgramSpec (code, flat memory image, overlays, registers)
plus an [EcallHandler], wires it to
[nub_exec::interp::Interpreter::run], and produces an
[InvocationResult]. This is the in-process counterpart to
nub-arch-x86’s JIT-driven enter_frame / build_frame_runtime.
The personality lowers its own object types into a ProgramSpec
(JAVM: javm::JavmLocal’s run_instance). For a program with no
personality at all, program::PreparedProgram lowers a
nub_program::ProgramBlob directly.
Re-exports§
pub use program::PrepareError;pub use program::PreparedProgram;pub use program::run_blob;
Modules§
- program
- Lower a [
ProgramBlob] into a runnableProgramSpec.
Structs§
- Exiting
Ecall Handler - Minimal
EcallHandler: everyecall/ecalliends the run by surfacing the correspondingExitReason, matching the JIT trampoline’s exit shape. - Local
Arch - In-process Arch backend.
- Program
Instance - A prepared address space plus predecoded code, ready to execute.
- Program
Spec - Personality-agnostic program description for
run_program: what to execute, over what memory, starting from which register file. The personality (JAVM:javm::JavmLocal’srun_instance) is responsible for lowering its own object types into this shape. - RoOverlay
- A read-only overlay re-laid on top of the flat memory image: the
bytes at
image[image_off..image_off + len]become read-only at guest addressstart, so guest stores fault (matching the recompiler’s pinned direct maps).
Enums§
- Local
Arch Error - Stub error type for the skeleton — the local backend cannot fail today. Replace with a real error enum when invocation lands.
Functions§
- run_
program - Run a prepared
ProgramSpecthrough the PVM2 (RISC-V) interpreter, returning the sameInvocationResultshapenub-arch-x86’s JIT path produces. The exit-reason mapping matches the JIT exit codes (HostCall=4, Trap=7, etc.) so the two backends agree on a well-formed program.