twizzler_security/
lib.rs

1#![feature(test)]
2#![no_std]
3#![warn(missing_debug_implementations, missing_docs)]
4
5//! Security primitives and capabilities for Twizzler.
6//!
7//! This crate provides the core security infrastructure including capabilities,
8//! delegations, gates, and security contexts.
9//!
10//! # Features
11//!
12//! - `kernel` - Enable kernel-space functionality
13//! - `user` - Enable user-space functionality (mutually exclusive with `kernel`)
14
15extern crate alloc;
16
17#[cfg(all(feature = "kernel", feature = "user"))]
18compile_error!("feature \"kernel\" and feature \"user\" cannot be enabled at the same time");
19
20pub(crate) use twizzler_rt_abi::error::SecurityError;
21
22#[cfg(feature = "user")]
23mod benches;
24
25#[cfg(feature = "user")]
26mod builder_ext;
27mod capability;
28mod delegation;
29mod flags;
30mod gates;
31mod keys;
32mod revocation;
33mod sec_ctx;
34
35#[cfg(feature = "user")]
36pub use builder_ext::*;
37pub use capability::*;
38pub use delegation::*;
39pub use flags::*;
40pub use gates::*;
41pub use keys::*;
42pub use revocation::*;
43pub use sec_ctx::*;