Skip to main content

oxide_k/
lib.rs

1//! # Oxide Kernel (`oxide-k`)
2//!
3//! The `oxide-k` crate is the central micro-kernel of the Rust Oxide Agent-Native OS.
4//! It orchestrates modules, mediates inter-module communication through a secure
5//! message bus, and maintains a global state registry backed by SQLite.
6//!
7//! The kernel is designed around three independent yet cooperating subsystems:
8//!
9//! * [`module`] – Module orchestration. Defines the [`Module`](module::Module) and
10//!   [`WasmModule`](module::WasmModule) traits and provides a
11//!   [`ModuleManager`](module::ModuleManager) that handles lifecycle (load, start,
12//!   stop, unload) for both native Rust and WebAssembly plugins.
13//! * [`bus`] – Secure message bus. An asynchronous message-passing layer built on
14//!   `tokio::sync::mpsc` with strongly-typed [`Command`](bus::Command) and
15//!   [`Event`](bus::Event) messages, plus an [`Envelope`](bus::Envelope) that
16//!   carries provenance metadata.
17//! * [`registry`] – Global state registry. A `sqlx`-backed SQLite store (in-memory
18//!   by default for development) for module metadata and configuration values.
19//!
20//! These are tied together by the [`Kernel`](kernel::Kernel) façade, which exposes
21//! a single entry point for kernel initialization and orchestration.
22
23#![deny(rust_2018_idioms)]
24#![warn(missing_docs)]
25
26pub mod bus;
27pub mod error;
28pub mod kernel;
29pub mod manifest;
30pub mod module;
31pub mod registry;
32pub mod xai;
33
34#[cfg(feature = "wasmtime-runtime")]
35pub mod wasm_exec;
36
37pub use error::{KernelError, Result};
38pub use kernel::Kernel;