Skip to main content

Crate reovim_kernel

Crate reovim_kernel 

Source
Expand description

Core kernel mechanisms for reovim.

Linux equivalent: kernel/

This crate provides pure mechanisms without I/O. Drivers and modules implement policies using these primitives.

§Usage

All public APIs are accessed via the api::v1 module:

use reovim_kernel::api::v1::*;

// Check API compatibility
check_api_version(Version::new(1, 0, 0))?;

// Use kernel types
let bus = EventBus::new();
pr_info!("kernel initialized");

§Subsystems

Internal subsystems (not directly accessible):

  • sched: Scheduler and runtime (Linux: kernel/sched/)
  • mm: Memory management / buffers (Linux: mm/)
  • ipc: Inter-process communication / events (Linux: ipc/)
  • core: Core primitives (motion, text objects, commands)
  • block: Block operations (undo, transactions)
  • printk: Kernel logging (Linux: kernel/printk/)
  • debug: Tracing and metrics
  • panic: Panic handling and recovery

All subsystem types are re-exported through api::v1.

Modules§

api
Stable kernel API.
testing
Test utilities for kernel-level testing.

Macros§

define_tracepoint
Define a trace point.
pr_debug
Logs a message at the Debug level.
pr_err
Logs a message at the Error level.
pr_info
Logs a message at the Info level.
pr_trace
Logs a message at the Trace level.
pr_warn
Logs a message at the Warn level.
profile
Profile a scope and record to histogram (legacy macro).
profile_counter
Increment a counter metric via the global profiler.
profile_fn
Profile a function (uses module path as target).
profile_histogram
Record a histogram sample via the global profiler.
profile_scope
Profile a scope with the Profiler trait.
trace_event
Emit a trace event if the trace point is enabled.