javm/lib.rs
1//! JAR v3 integration crate.
2//!
3//! Composes the foundational cap system (`javm-cap`) and the pure
4//! execution engine (`javm-exec`) into a call-stack-aware VM driver
5//! that implements the v3 kernel ABI.
6//!
7//! This crate is what `jar-kernel-v3` will call into for every CALL,
8//! CALL_RESUME, host call, and yield routing.
9//!
10//! `Vm::invoke_cached` is the canonical entry point: callers publish
11//! caps into a `CacheDirectory` (via `javm_cap::CacheDirectory::publish_*`)
12//! and then ask the Vm to drive a published instance by hash. The
13//! Vm holds only the call-stack-side working state; cap content
14//! lives in the cache.
15
16pub mod callstack;
17pub mod ecall;
18pub mod error;
19pub mod frame;
20pub mod image_cache;
21pub mod kernel_assist;
22pub mod vm;
23
24pub use callstack::{
25 CallStack, DEFAULT_MAX_DEPTH, Entry, EntryStatus, InstanceEntry, ReferenceEntry,
26};
27pub use error::VmError;
28pub use frame::{BareFrame, MainFrame};
29pub use image_cache::ImageCache;
30pub use kernel_assist::{
31 InProcessKernelAssist, KernelAssist, KernelImage, MeterId, QuotaId, kernel_image_hash,
32 recognize_kernel_image,
33};
34pub use vm::{CallResult, Vm};