Skip to main content

Crate capability_core

Crate capability_core 

Source
Expand description

capability-core — the capability vocabulary, body-usage inspector, and declared-vs-detected subset check shared between capability-attr (the #[capability(...)] proc-macro) and taint-generate (auto-writes a #[capability(...)] matching a function’s actual, detected usage).

Extracted from capability-attr’s own private modules — none of this was ever public API (a proc-macro = true crate can only export its macro entry points to begin with, the same reason path-match was extracted earlier), so moving it here changes no compatibility guarantee. See docs/adr/ADR-0005-generate-and-refactor.md.

Re-exports§

pub use lattice::check_subset;
pub use lattice::Violation;
pub use render::render_capability_args;
pub use vocabulary::AllocLevel;
pub use vocabulary::CapabilitySet;
pub use vocabulary::IoLevel;
pub use vocabulary::PtrBound;
pub use vocabulary::PtrLevel;

Modules§

inspector
BodyInspector — a syn::visit::Visit walker that detects actual capability usage inside a function body.
lattice
Subset checking: does the detected CapabilitySet from a function body exceed what was declared in #[capability(...)]?
render
Render a CapabilitySet back into #[capability(...)]’s surface syntax.
vocabulary
Capability vocabulary types: alloc/io/ptr levels and the combined CapabilitySet.