Skip to main content

Crate ruvix_shell

Crate ruvix_shell 

Source
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 only alloc for dynamic allocation
  • Line-based parsing: Simple command parser suitable for serial consoles
  • Trait-based backend: ShellBackend trait for kernel integration
  • Modular commands: Each command in its own module for maintainability

§Available Commands

CommandDescription
helpShow available commands
infoKernel version, boot time, uptime
memMemory statistics
tasksTask listing
capsCapability table dump
queuesQueue statistics
vectorsVector store info
proofsProof statistics
cpuCPU info for SMP
witnessWitness log viewer
perfPerformance counters
traceSyscall tracing toggle
rebootTrigger 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.
KernelInfo
Kernel information.
MemoryStats
Memory statistics returned by the shell backend.
Parser
Command line parser.
PerfCounters
Performance counter data.
ProofStats
Proof subsystem statistics.
QueueStats
Queue statistics.
Shell
The debug shell processor.
ShellConfig
Shell configuration options.
TaskInfo
Task information returned by the shell backend.
VectorStats
Vector store statistics.
WitnessEntry
Witness log entry.

Enums§

Command
Parsed command representation.
ParseError
Parse error types.
TaskState
Task state enumeration.

Traits§

ShellBackend
Trait for kernel integration with the debug shell.