capsec
Compile-time capability-based security for Rust.
This is the facade crate — it re-exports everything from capsec-core, capsec-macro, and capsec-std under a single dependency. This is the crate you should depend on.
Install
# Or from source:
Quick start
use *;
// Leaf functions take &impl CapProvider<P> — works with raw caps, context structs, AND scoped caps
What's re-exported
| From | What you get |
|---|---|
capsec-core |
Cap, SendCap, Has, Permission, CapRoot, FsRead, NetConnect, etc. |
capsec-macro |
#[capsec::requires], #[capsec::deny], #[capsec::main], #[capsec::context] |
capsec-std |
capsec::fs, capsec::net, capsec::env, capsec::process |
Also provides:
capsec::run(|root| { ... })— convenience entry pointcapsec::prelude::*— common imports
Testing
test_root() bypasses the singleton check and is available in debug/test builds (#[cfg(debug_assertions)]). It cannot be enabled in release builds — there is no feature flag:
License
Apache-2.0