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.
vocabulary—vocabulary::CapabilitySetand its three category types (vocabulary::AllocLevel,vocabulary::IoLevel,vocabulary::PtrLevel/vocabulary::PtrBound).inspector—inspector::BodyInspector/inspector::inspect_body, thesyn::visit::Visitwalker that detects actual capability usage in a function body.lattice—lattice::Violation/lattice::check_subset, the declared-vs-detected comparisoncapability-attruses to decide whether to emit acompile_error!.
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— asyn::visit::Visitwalker that detects actual capability usage inside a function body.- lattice
- Subset checking: does the detected
CapabilitySetfrom a function body exceed what was declared in#[capability(...)]? - render
- Render a
CapabilitySetback into#[capability(...)]’s surface syntax. - vocabulary
- Capability vocabulary types:
alloc/io/ptrlevels and the combinedCapabilitySet.