Expand description
§RVM Core Types
Foundation types for the RVM (RuVix Virtual Machine) coherence-native
microhypervisor, as specified in ADR-132, ADR-133, and ADR-134. This
crate has minimal external dependencies and provides the type vocabulary
shared by all RVM crates.
§First-Class Objects (ADR-132)
| Type | Purpose |
|---|---|
PartitionId | Coherence domain container; unit of scheduling, isolation, and migration |
Capability | Unforgeable authority token; grants specific rights over specific objects |
WitnessRecord | 64-byte audit record emitted by every privileged action |
MemoryRegion | Typed, tiered, owned memory range with explicit lifetime |
CommEdge | Inter-partition communication channel; weighted edge in the coherence graph |
DeviceLease | Time-bounded, revocable access grant to a hardware device |
CoherenceScore | Locality and coupling metric derived from the coherence graph |
CutPressure | Graph-derived isolation signal; high pressure triggers migration or split |
RecoveryCheckpoint | State snapshot for rollback and reconstruction |
§Design Constraints
#![no_std]with zero heap allocation in the default configuration#![forbid(unsafe_code)]– all types are safe Rust- All identifiers are
Copy + Clone + Eq + Hash-compatible newtypes
Structs§
- CapRights
- Access rights bitmap carried by a capability (ADR-132, DC-3/DC-8).
- CapToken
- An unforgeable capability token.
- Capability
- Unforgeable capability with full delegation metadata.
- Capability
Id - Unique identifier for a capability in the system-wide capability space.
- Coherence
Score - A coherence score in the range
[0.0, 1.0]. - Comm
Edge - A weighted communication edge between two partitions.
- Comm
Edge Id - Unique identifier for a communication edge in the coherence graph.
- CutPressure
- Cut pressure: graph-derived isolation signal (ADR-132, DC-2).
- Device
Lease - A time-bounded, revocable device lease.
- Device
Lease Id - Unique identifier for a device lease.
- Epoch
Config - Configuration for a scheduler epoch.
- Epoch
Summary - Summary of a scheduler epoch for witness logging.
- Guest
Phys Addr - A guest physical address, scoped to a partition.
- Memory
Region - A typed, tiered, owned memory region.
- Owned
Region Id - Unique identifier for an owned memory region.
- Partition
Config - Partition creation configuration.
- Partition
Id - Unique identifier for a coherence partition.
- PhiValue
- An integrated-information (Phi) value used as a coherence input signal.
- Phys
Addr - A host physical address.
- Priority
- Priority level for scheduling.
- Proof
Token - A proof token that attests to a verified proof.
- Reconstruction
Receipt - A receipt for reconstructing a hibernated partition.
- Recovery
Checkpoint - A recovery checkpoint (state snapshot).
- Region
Placement Weights - Placement weights for region assignment during split.
- Region
Policy - Access policy for a memory region.
- RvmConfig
- Top-level RVM configuration.
- VcpuId
- Virtual CPU identifier within a partition.
- Virt
Addr - A host virtual address.
- Witness
Hash - A 256-bit witness commitment hash.
- Witness
Record - A single witness record. Exactly 64 bytes, cache-line aligned.
Enums§
- Action
Kind - Privileged actions that produce witness records (ADR-134, Section 2).
- CapType
- The type of resource a capability refers to.
- Device
Class - Classification of device types.
- Failure
Class - Classification of failure severity.
- GpuMemory
Type - GPU memory type classification.
- GpuQueue
Priority - GPU command queue priority.
- Memory
Tier - Memory tier classification (hot/warm/cold).
- Partition
State - Partition lifecycle state.
- Partition
Type - Partition type classification.
- Proof
Result - Result of a proof verification.
- Proof
Tier - Proof tier (P1, P2, P3).
- RvmError
- The unified error type for RVM operations.
- Scheduler
Mode - Scheduler operating mode.
Constants§
- MAX_
DELEGATION_ DEPTH - Maximum delegation depth for capabilities (ADR-132).
- MAX_
DEVICES_ PER_ PARTITION - Maximum device leases per partition.
- MAX_
EDGES_ PER_ PARTITION - Maximum communication edges per partition.
- MAX_
PARTITIONS - Maximum partitions per RVM instance.
- WITNESS_
RECORD_ SIZE - Witness record size in bytes.
- WITNESS_
RING_ CAPACITY - Default witness ring buffer capacity in records.
Functions§
Type Aliases§
- RvmResult
- Shorthand result type for RVM operations.