Skip to main content

Crate javm_exec

Crate javm_exec 

Source
Expand description

JAR v3 execution engine.

Pure PVM2 (RV+C+Zbb+Zba+Zbs+Zicond+custom-0) execution: interpreter, recompiler (JIT, lives in the javm-recompiler-x86 crate), memory pages, gas metering, registers, ExitReason, and an EcallHandler trait that abstracts the ecall ABI from the engine.

No knowledge of capabilities or caps. The execution engine knows it has registers, memory pages, gas budget, and an opaque ecall number; the caller (the javm integration crate) supplies the EcallHandler that interprets ecall numbers as MGMT operations, host-call selectors, etc.

Re-exports§

pub use ecall::EcallHandler;
pub use ecall::EcallKind;
pub use ecall::EcallResult;
pub use ecall::PanickingHandler;
pub use exit::ExitReason;
pub use gas::Gas;
pub use gas::GasCounter;
pub use gas::OutOfGas;
pub use mem::Access;
pub use mem::CopyingMemory;
pub use mem::MapError;
pub use mem::Mem;
pub use mem::MemAccess;
pub use mem::Memory;
pub use mem::PAGE_SIZE;
pub use mem::TouchFault;
pub use mem::perm;
pub use regs::REG_COUNT;
pub use regs::Regs;

Modules§

ecall
EcallHandler trait: how the execution engine dispatches ecalls to the integration layer.
exit
ExitReason: terminal status from an execution batch.
gas
Gas counter: a non-negative u64 representing remaining budget.
gas_const
Shared gas / resource cost constants and the category-#2 memory footprint multiplier.
gas_cost
Per-basic-block gas cost model for PVM2 (JAR v0.8.0).
gas_sim
Single-pass pipeline gas model (JAR v0.8.0).
instruction
RV64+C+custom-0 instruction decoder for PVM2.
interp
PVM2 (RV+C+Zbb+Zba+Zbs+Zicond+custom-0) interpreter.
mat
Shared per-page memory-materialization (#3) state machine.
mem
Flat-buffer memory model + the Memory trait that abstracts over different memory backends (software-copy here, hardware-paged in the bare-metal Hyperlight guest).
predecode
Single-pass predecode for PVM2 (RV+C+custom-0) byte streams.
regs
Register state: 15 general-purpose 64-bit registers + PC.