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:
| Primitive | Purpose | Analog |
|---|---|---|
| Task | Unit of concurrent execution with capability set | seL4 TCB |
| Capability | Unforgeable typed token granting access to a resource | seL4 capability |
| Region | Contiguous memory with access policy | seL4 Untyped + frame |
| Queue | Typed ring buffer for inter-task communication | io_uring SQ/CQ |
| Timer | Deadline-driven scheduling primitive | POSIX timer_create |
| Proof | Cryptographic attestation gating state mutation | Novel (ADR-047) |
§Features
std: Enable standard library supportalloc: 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.
- Coherence
Meta - Coherence metadata associated with each vector.
- Graph
Handle - Handle to a kernel-resident graph store.
- Graph
Mutation - A graph mutation request.
- Handle
- A generic handle to a kernel object.
- Optimized
Proof Cache - Optimized proof cache with hash table for O(1) operations.
- Optimized
Proof Entry - Optimized cache entry aligned to reduce cache pressure.
- Proof
Attestation - A proof attestation recorded in the kernel witness log.
- Proof
Cache - Secure proof cache with TTL, single-use nonces, and bounded size.
- Proof
Cache Entry - A single entry in the proof cache.
- Proof
Cache Stats - Statistics about the proof cache.
- Proof
Token - A proof token authorizing a specific mutation.
- Queue
Config - Queue ring buffer configuration.
- Queue
Handle - Handle to a kernel queue.
- Region
Handle - Handle to a memory region.
- RvfComponent
Id - Identifier for an RVF component within a mounted package.
- RvfMount
Handle - Handle to a mounted RVF package.
- Scheduler
Partition - Task scheduling partition.
- Scheduler
Score - Scheduler score combining multiple signals.
- Sensor
Descriptor - Sensor descriptor identifying a data source.
- Subscription
Handle - Handle to a sensor subscription.
- Task
Handle - Handle to a task (unit of concurrent execution).
- Vector
Key - Key for addressing vectors in a vector store.
- Vector
Store Config - Configuration for creating a kernel vector store.
- Vector
Store Handle - Handle to a kernel-resident vector store.
- WitType
Id - RVF WIT (WASM Interface Types) type identifier.
Enums§
- Cache
Error - Error types for proof cache operations.
- Graph
Mutation Kind - Kind of graph mutation operation.
- Kernel
Error - Kernel error codes.
- MsgPriority
- Message priority for queue operations.
- Object
Type - The type of a kernel object.
- Proof
Payload - Proof payload containing the actual proof data.
- Proof
Tier - Proof tier determining verification complexity.
- Region
Policy - Memory region access policy.
- RvfVerify
Status - RVF package verification status.
- Sensor
Type - Type of sensor data source.
- Task
Priority - Task scheduling priority.
- Timer
Spec - 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_ENTRIESfor the canonical value. - REFLEX_
CACHE_ TTL_ MS - Default Reflex proof cache TTL in milliseconds (Section 20.4).
See
proof_cache::PROOF_CACHE_TTL_MSfor the canonical value.