reovim_kernel/lib.rs
1#![cfg_attr(coverage_nightly, allow(unused_features))]
2#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
3//! Core kernel mechanisms for reovim.
4//!
5//! Linux equivalent: `kernel/`
6//!
7//! This crate provides pure mechanisms without I/O. Drivers and modules
8//! implement policies using these primitives.
9//!
10//! # Usage
11//!
12//! All public APIs are accessed via the `api::v1` module:
13//!
14//! ```ignore
15//! use reovim_kernel::api::v1::*;
16//!
17//! // Check API compatibility
18//! check_api_version(Version::new(1, 0, 0))?;
19//!
20//! // Use kernel types
21//! let bus = EventBus::new();
22//! pr_info!("kernel initialized");
23//! ```
24//!
25//! # Subsystems
26//!
27//! Internal subsystems (not directly accessible):
28//!
29//! - `sched`: Scheduler and runtime (Linux: `kernel/sched/`)
30//! - `mm`: Memory management / buffers (Linux: `mm/`)
31//! - `ipc`: Inter-process communication / events (Linux: `ipc/`)
32//! - `core`: Core primitives (motion, text objects, commands)
33//! - `block`: Block operations (undo, transactions)
34//! - `printk`: Kernel logging (Linux: `kernel/printk/`)
35//! - `debug`: Tracing and metrics
36//! - `panic`: Panic handling and recovery
37//!
38//! All subsystem types are re-exported through `api::v1`.
39
40// ============================================================================
41// Public API - the ONLY public module
42// ============================================================================
43
44pub mod api;
45pub mod testing;
46
47#[cfg(test)]
48mod testing_tests;
49
50// ============================================================================
51// Internal modules - NOT accessible from outside
52// ============================================================================
53
54pub(crate) mod block;
55pub(crate) mod core;
56#[allow(dead_code)] // Infrastructure for future use
57pub(crate) mod debug;
58pub(crate) mod ipc;
59pub(crate) mod mm;
60#[allow(dead_code)] // Infrastructure for future use
61pub(crate) mod panic;
62pub(crate) mod printk;
63pub(crate) mod sched;
64
65// Re-export arch for internal use only
66pub(crate) use reovim_arch as arch;