rvm-types
Foundation types for the RVM coherence-native microhypervisor.
This crate defines the type vocabulary shared by all RVM crates: addresses,
identifiers, capabilities, witness records, coherence scores, and error types.
It has zero external dependencies beyond bitflags and compiles under no_std
with no heap allocation in the default configuration.
Key Types
PartitionId,VcpuId-- newtype identifiers (Copy + Eq)PhysAddr,GuestPhysAddr,VirtAddr-- address types with alignment helpersCapability,CapToken,CapRights,CapType-- unforgeable authority tokensWitnessRecord-- 64-byte, cache-line-aligned audit recordWitnessHash-- 32-byte hash used in witness chainsCoherenceScore,CutPressure,PhiValue-- fixed-point coherence metricsMemoryRegion,MemoryTier,RegionPolicy-- typed memory descriptorsCommEdge,CommEdgeId-- inter-partition communication edgesDeviceLease,DeviceClass-- time-bounded device access grantsProofTier,ProofToken,ProofResult-- proof system primitivesPartitionConfig,PartitionState,PartitionType-- partition descriptorsEpochConfig,EpochSummary,Priority,SchedulerMode-- scheduler typesFailureClass,RecoveryCheckpoint-- fault recovery typesRvmError,RvmResult-- unified error typeRvmConfig-- system-wide configuration
Example
use ;
let id = new;
assert_eq!; // VMID for hardware
let score = from_basis_points; // 75%
assert!;
let token = new;
assert!;
Design Constraints
- DC-3: Capabilities are unforgeable, monotonically attenuated
- DC-9: Coherence score range [0.0, 1.0] as fixed-point basis points
- DC-12: Max 256 physical VMIDs (8-bit VMID from
PartitionId) - DC-14: Failure classes: transient, recoverable, permanent, catastrophic
- DC-15:
#![no_std],#![forbid(unsafe_code)],#![deny(missing_docs)]
Workspace Dependencies
None (leaf crate). Only depends on bitflags.