Skip to main content

Crate ruvix_types

Crate ruvix_types 

Source
Expand description

§RuVix Kernel Interface Types

This crate provides all kernel interface types for the RuVix Cognition Kernel as specified in ADR-087. It is designed to be no_std compatible with zero external dependencies, ensuring it can be used in both kernel code and RVF component code.

§Core Primitives

RuVix has exactly six kernel primitives:

PrimitivePurposeAnalog
TaskUnit of concurrent execution with capability setseL4 TCB
CapabilityUnforgeable typed token granting access to a resourceseL4 capability
RegionContiguous memory with access policyseL4 Untyped + frame
QueueTyped ring buffer for inter-task communicationio_uring SQ/CQ
TimerDeadline-driven scheduling primitivePOSIX timer_create
ProofCryptographic attestation gating state mutationNovel (ADR-047)

§Features

  • std: Enable standard library support
  • alloc: Enable alloc crate support for heap allocation

Modules§

proof_cache_mod
Re-export proof cache module for direct access.

Structs§

CapHandle
Handle to a capability entry in the capability table.
CapRights
Capability rights bitmap.
Capability
A capability is a kernel-managed, unforgeable access token.
CoherenceMeta
Coherence metadata associated with each vector.
GraphHandle
Handle to a kernel-resident graph store.
GraphMutation
A graph mutation request.
Handle
A generic handle to a kernel object.
OptimizedProofCache
Optimized proof cache with hash table for O(1) operations.
OptimizedProofEntry
Optimized cache entry aligned to reduce cache pressure.
ProofAttestation
A proof attestation recorded in the kernel witness log.
ProofCache
Secure proof cache with TTL, single-use nonces, and bounded size.
ProofCacheEntry
A single entry in the proof cache.
ProofCacheStats
Statistics about the proof cache.
ProofToken
A proof token authorizing a specific mutation.
QueueConfig
Queue ring buffer configuration.
QueueHandle
Handle to a kernel queue.
RegionHandle
Handle to a memory region.
RvfComponentId
Identifier for an RVF component within a mounted package.
RvfMountHandle
Handle to a mounted RVF package.
SchedulerPartition
Task scheduling partition.
SchedulerScore
Scheduler score combining multiple signals.
SensorDescriptor
Sensor descriptor identifying a data source.
SubscriptionHandle
Handle to a sensor subscription.
TaskHandle
Handle to a task (unit of concurrent execution).
VectorKey
Key for addressing vectors in a vector store.
VectorStoreConfig
Configuration for creating a kernel vector store.
VectorStoreHandle
Handle to a kernel-resident vector store.
WitTypeId
RVF WIT (WASM Interface Types) type identifier.

Enums§

CacheError
Error types for proof cache operations.
GraphMutationKind
Kind of graph mutation operation.
KernelError
Kernel error codes.
MsgPriority
Message priority for queue operations.
ObjectType
The type of a kernel object.
ProofPayload
Proof payload containing the actual proof data.
ProofTier
Proof tier determining verification complexity.
RegionPolicy
Memory region access policy.
RvfVerifyStatus
RVF package verification status.
SensorType
Type of sensor data source.
TaskPriority
Task scheduling priority.
TimerSpec
Timer specification for timer_wait.

Constants§

ATTESTATION_SIZE
The witness size in bytes for proof attestations (ADR-047 compatible).
MAX_DELEGATION_DEPTH
Maximum capability delegation depth (Section 20.2).
REFLEX_CACHE_SIZE
Default Reflex proof cache size (Section 20.4). See proof_cache::PROOF_CACHE_MAX_ENTRIES for the canonical value.
REFLEX_CACHE_TTL_MS
Default Reflex proof cache TTL in milliseconds (Section 20.4). See proof_cache::PROOF_CACHE_TTL_MS for the canonical value.