javm_exec/lib.rs
1#![cfg_attr(not(feature = "std"), no_std)]
2
3//! JAR v3 execution engine.
4//!
5//! Pure PVM2 (RV+C+Zbb+Zba+Zbs+Zicond+custom-0) execution:
6//! interpreter, recompiler (JIT, lives in the `javm-recompiler-x86`
7//! crate), memory pages, gas metering, registers, ExitReason, and an
8//! `EcallHandler` trait that abstracts the ecall ABI from the engine.
9//!
10//! No knowledge of capabilities or caps. The execution engine knows
11//! it has registers, memory pages, gas budget, and an opaque ecall
12//! number; the caller (the `javm` integration crate) supplies the
13//! `EcallHandler` that interprets ecall numbers as MGMT operations,
14//! host-call selectors, etc.
15
16#[macro_use]
17extern crate alloc;
18
19pub mod ecall;
20pub mod exit;
21pub mod gas;
22pub mod gas_const;
23pub mod gas_cost;
24pub mod gas_sim;
25pub mod instruction;
26pub mod interp;
27pub mod mat;
28pub mod mem;
29pub mod predecode;
30pub mod regs;
31
32pub use ecall::{EcallHandler, EcallKind, EcallResult, PanickingHandler};
33pub use exit::ExitReason;
34pub use gas::{Gas, GasCounter, OutOfGas};
35pub use mem::{
36 Access, CopyingMemory, MapError, Mem, MemAccess, Memory, PAGE_SIZE, TouchFault, perm,
37};
38pub use regs::{REG_COUNT, Regs};