Expand description
JAR v3 capability system.
Defines the five v3 cap kinds (Instance, Image, Data, CNode, Type), their content-bearing representations, a two-tier cache for identity-keyed mutable state + content-addressed blobs, and the primitives (BMT, hash) used by upstream layers.
Cap and its inner storage use the default Global allocator (=
std heap on host, talc on guest via #[global_allocator]). The
cache layer’s outer storage (HashMap / Box parameters) may still
be parameterised on a custom allocator for shared-memory layouts.
See ~/jar/website/content/spec/implementation/architecture.md for
the crate’s role in the overall layering.
Re-exports§
pub use cache::CacheDirectory;pub use cache::CacheError;pub use cap::Cap;pub use cap::CapHash;pub use cap::CapHashOrRef;pub use cap::CapKind;pub use cap::CapRef;pub use cap::MAX_ENDPOINTS;pub use cap::MAX_SOURCE_DEPTH;pub use cap::NUM_REGS;pub use cap::TypeCap;pub use cap_hash::cap_hash;pub use cnode::CNodeCap;pub use cnode::CNodeSlotEntry;pub use data::DataCap;pub use data::DataContent;pub use data::PAGE_SIZE;pub use error::CapError;pub use error::OpError;pub use hash::Blake2b256;pub use hash::Hash;pub use image::EndpointDef as ImageEndpointDef;pub use image::Image;pub use image::InitialDataCap;pub use image::MemoryMapping as ImageMemoryMapping;pub use image::PinnedCap;pub use image::chain_extend;pub use image::chain_genesis;pub use image::image_content_hash;pub use image_cap::EndpointDef;pub use image_cap::ImageCap;pub use image_cap::ImageConvertError;pub use image_cap::ImageSlotEntry;pub use image_cap::MemoryMapping;pub use image_cap::image_cap;pub use instance::InstanceCap;pub use instance::RwOverlay;pub use page::PageBytes;pub use page::PageRef;pub use page::PageSlot;pub use slot::SlotIdx;pub use slot::SlotPath;
Modules§
- abi
- Well-known cnode slot indices the v3 chain ABI exposes at genesis. Shared between jar-kernel (which populates the slots at chain init) and consumers like the JAVM transpiler (which emit chain Images referencing them).
- cache
CacheDirectory<S>— two-tier cap store.- cap
Cap— cap enum + shared constants.- cap_
hash - Cap-level hashing — delegates to SSZ
hash_tree_root. - cnode
CNodeCap— CNode cap.- data
DataCap— Data cap.- error
- Errors for cap operations.
- hash
- Hash trait and default Blake2b-256 implementation.
- image
- Image: the smallest unit of program specification.
- image_
cap ImageCap— Image cap.- instance
InstanceCap— Instance cap with mutable working state.- page
PageSlotandPageRef— DataCap page storage.- slot
- Slot addressing for cnodes.
- wire
- Wire-form caps for the host ↔ guest
put_capRPC.