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//!
15//! ```
16
17extern crate alloc;
18
19#[cfg(all(feature = "kernel", feature = "user"))]
20compile_error!("feature \"kernel\" and feature \"user\" cannot be enabled at the same time");
21
22pub(crate) use twizzler_rt_abi::error::SecurityError;
23
24#[cfg(feature = "user")]
25mod benches;
26
27#[cfg(feature = "user")]
28mod builder_ext;
29mod capability;
30mod delegation;
31mod flags;
32mod gates;
33mod keys;
34mod revocation;
35mod sec_ctx;
36
37#[cfg(feature = "user")]
38pub use builder_ext::*;
39pub use capability::*;
40pub use delegation::*;
41pub use flags::*;
42pub use gates::*;
43pub use keys::*;
44pub use revocation::*;
45pub use sec_ctx::*;