Expand description
User-facing Contract traits (Index, Backend, Aggregator, …).
User-facing Contract traits — what a library maker implements
when shipping a concrete component. The derives in bb-derive
bridge these into the per-component dispatch_fn the engine
holds.
Canonical home for bb-runtime. bb-dsl::contracts re-exports
from here so the authoring path bb_dsl::Index keeps working.
Modules§
- aggregator
bb::Aggregator— Contract trait for federated aggregators.- backend
bb::Backend— Contract trait for tensor compute backends.- backend_
default_ walk - Shared default impls for the
BackendContract trait. - bootstrap
bb::Bootstrap— optional Component initialization phase.- codec
bb::Codec— bidirectional storage-type bridge.- data_
source bb::DataSource— Contract trait for data loaders.- index
bb::Index— Contract trait for vector indexes.- model
bb::Model— Contract trait for ML models.- peer_
selector bb::PeerSelector— Contract trait for peer-selection protocols.
Structs§
- Bootstrap
Ctx - Per-dispatch context handed to a Component bootstrap. F5 will
extend this with
RuntimeResourceRef-style accessors so impls can stage outputs, allocate resources, or surfaceCompletionHandles for async work. Today the struct only carries the dispatching Component’s reference so impls have a stable identifier they can log against.
Enums§
- Select
Params - Parameters describing what peer set to select. Different
concrete selectors handle the variants they support and return
an error variant for the ones they don’t (e.g.
GlobalRegistrysupportsRandom+All;DhtViewsupportsNearKey).
Traits§
- Aggregator
- User-facing Contract trait for a federated/decentralized
aggregator. The derive bridges these methods to the engine’s
crate::roles::AggregatorRuntimetrait. - Backend
- User-facing Contract trait for a tensor compute backend.
- Bootstrap
- User-facing Contract trait for Component bootstrap. Default no-op means existing Components opt in by implementing the trait — the framework treats every Component as implicitly bootstrap-capable.
- Codec
- User-facing Contract trait for a typed in/out storage codec.
- Data
Source - User-facing Contract trait for a data source / data loader.
- Index
- User-facing Contract trait for a vector index.
- Model
- User-facing Contract trait for an ML model.
- Peer
Selector - User-facing Contract trait for a peer-selection protocol.