wasm_capability_contract/lib.rs
1//! `wasm-capability-contract` — the capability-sandbox contract (ADR-001):
2//! trait/DTO surface only. See `wasm-capability-core` (this repo) for this
3//! pattern's own default implementation, and
4//! `docs/3-architecture/adr/ADR-001-capability-layer-design.md` at the
5//! repo root for the full design this crate is a direct contract for.
6//!
7//! No `api/` wrapper directory: a `contract` crate has exactly one real
8//! layer by construction (`swearchitect#388`) — its own `src/` already
9//! is that layer, so nesting everything one level deeper under a
10//! same-purpose `api/` folder is redundant, not a second, distinct SEA
11//! layer being introduced.
12//!
13//! `CapabilityDispatcher`/`CapabilityRegistry` keep their real, deliberate
14//! signatures (a multi-parameter `dispatch`, a non-`Result` `descriptor`
15//! lookup) rather than being forced into `arch`'s generic `*Request`/
16//! `*Response` shape — see `docs/known-exceptions.md` for why.
17
18mod capability;
19mod component;
20
21pub use capability::{
22 CapabilityDescriptor, CapabilityDispatcher, CapabilityGrant, CapabilityRegistry,
23 CapabilityScope,
24};
25pub use component::{
26 CapabilityEngine, CapabilityError, ComponentHandle, ComponentInvokeRequest,
27 ComponentInvokeResponse, ComponentLoadRequest, ComponentLoadResponse, ComponentManifest,
28 ComponentValidator, ResourceLimits, ValidateComponentRequest,
29};