reovim_kernel/api/mod.rs
1//! Stable kernel API.
2//!
3//! Linux equivalent: `include/linux/`
4//!
5//! This module defines the stable interface that drivers and modules depend on.
6//! All public APIs are accessed exclusively via the `v1` module.
7//!
8//! # Module Structure
9//!
10//! - `v1`: Stable API v1 - the primary public interface
11//! - `unstable`: Experimental APIs (feature-gated)
12//! - `internal`: Internal kernel APIs (doc hidden)
13//!
14//! # Usage
15//!
16//! ```ignore
17//! use reovim_kernel::api::v1::*;
18//!
19//! // Check API compatibility
20//! check_api_version(Version::new(1, 0, 0))?;
21//!
22//! // Use kernel types
23//! let bus = EventBus::new();
24//! pr_info!("kernel initialized");
25//! ```
26
27// ============================================================================
28// Internal modules (not directly exposed)
29// ============================================================================
30
31// Buffer manager trait (mechanism) - used by KernelContext
32mod buffer_manager;
33mod context;
34mod debug;
35// Note: pub(crate) to allow core/mode.rs to access ModuleId
36pub(crate) mod module;
37// Service registry for cross-module service discovery
38mod service;
39mod version;
40
41// Note: The following modules have been removed as part of the kernel-driver
42// architecture cleanup (Issue #213):
43// - traits.rs - Operator, KeymapProvider, CommandHandler moved to drivers
44// - syntax.rs - SyntaxHighlight moved to lib/drivers/syntax/
45// - undo_manager.rs - UndoManager trait moved to runner
46// - window_manager.rs - WindowId moved to mm/, WindowManager to runner
47
48// ============================================================================
49// Public modules
50// ============================================================================
51
52/// Stable API v1.
53///
54/// This is the primary public interface. All stable kernel APIs are accessed
55/// through this module.
56pub mod v1;
57
58/// Experimental APIs (feature-gated).
59///
60/// APIs in this module may change without notice. Enable the `unstable-api`
61/// feature to use them.
62#[cfg(feature = "unstable-api")]
63pub mod unstable;
64
65/// Internal kernel APIs.
66///
67/// These APIs are for kernel-internal use only and are hidden from documentation.
68#[doc(hidden)]
69pub mod internal;
70
71// ============================================================================
72// Re-exports
73// ============================================================================
74
75/// Re-export v1 at api level for convenience.
76///
77/// This allows both `use reovim_kernel::api::v1::*` and
78/// `use reovim_kernel::api::*` to work.
79pub use v1::*;
80
81#[cfg(test)]
82mod tests;