ukernel_sys/lib.rs
1//! System interface types for µKernel.
2//!
3//! This crate defines the ABI between userspace domains and the µKernel
4//! microkernel. It contains:
5//!
6//! - [`KernelOp`] — the ~30 primitive kernel operations
7//! - [`SubmitEntry`] / [`CompleteEntry`] — submission ring entry types
8//! - [`SubmitRing`] — shared-memory ring buffer layout
9//! - [`SubsystemId`] — hashed subsystem identity for loadable domain types
10//!
11//! # Architecture
12//!
13//! ```text
14//! Application (Rust std or no_std)
15//! ↓
16//! libposix.a (queues KernelOps into ring)
17//! ↓ SYS_SUBMIT
18//! µKernel (processes ring, capability checks)
19//! ```
20//!
21//! This crate defines the types at the `↓` boundary. It is `no_std` and
22//! has zero dependencies.
23//!
24//! # Usage
25//!
26//! Most applications don't use this crate directly — they use Rust `std`
27//! (via the `x86_64-americankernel-ukernel` target) or `libposix`. This
28//! crate is for:
29//!
30//! - Building custom domain runtimes
31//! - Writing kernel-level drivers or subsystems
32//! - Understanding the µKernel syscall interface
33//!
34//! # Links
35//!
36//! - [µKernel](https://americankernel.com) — product information
37//! - [Vinci Consulting](https://vinciconsulting.com) — engineering services
38
39#![no_std]
40#![forbid(unsafe_code)]
41
42pub mod kernel_op;
43pub mod submit_ring;
44pub mod subsystem;
45
46pub use kernel_op::KernelOp;
47pub use submit_ring::{CompleteEntry, SubmitEntry, SubmitRing, RING_SIZE, RING_VADDR};
48pub use subsystem::SubsystemId;