Expand description
§RuVix In-Kernel Debug Shell
This crate provides an in-kernel debug shell for the RuVix Cognition Kernel as specified in ADR-087. It enables runtime inspection of kernel state, memory statistics, task information, and proof subsystem status.
§Design Principles
#![no_std]compatible: Uses onlyallocfor dynamic allocation- Line-based parsing: Simple command parser suitable for serial consoles
- Trait-based backend:
ShellBackendtrait for kernel integration - Modular commands: Each command in its own module for maintainability
§Available Commands
| Command | Description |
|---|---|
help | Show available commands |
info | Kernel version, boot time, uptime |
mem | Memory statistics |
tasks | Task listing |
caps | Capability table dump |
queues | Queue statistics |
vectors | Vector store info |
proofs | Proof statistics |
cpu | CPU info for SMP |
witness | Witness log viewer |
perf | Performance counters |
trace | Syscall tracing toggle |
reboot | Trigger reboot |
§Example
ⓘ
use ruvix_shell::{Shell, ShellBackend, ShellConfig};
struct MyKernel { /* kernel state */ }
impl ShellBackend for MyKernel {
// Implement trait methods...
}
let config = ShellConfig::default();
let mut shell = Shell::new(config);
let output = shell.execute_line("help", &kernel);Modules§
- commands
- Command implementations for the RuVix debug shell.
Structs§
- CapEntry
- Capability table entry information.
- CpuInfo
- CPU information for SMP.
- Kernel
Info - Kernel information.
- Memory
Stats - Memory statistics returned by the shell backend.
- Parser
- Command line parser.
- Perf
Counters - Performance counter data.
- Proof
Stats - Proof subsystem statistics.
- Queue
Stats - Queue statistics.
- Shell
- The debug shell processor.
- Shell
Config - Shell configuration options.
- Task
Info - Task information returned by the shell backend.
- Vector
Stats - Vector store statistics.
- Witness
Entry - Witness log entry.
Enums§
- Command
- Parsed command representation.
- Parse
Error - Parse error types.
- Task
State - Task state enumeration.
Traits§
- Shell
Backend - Trait for kernel integration with the debug shell.