Skip to main content

Module contracts

Module contracts 

Source
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 Backend Contract 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§

BootstrapCtx
Per-dispatch context handed to a Component bootstrap. F5 will extend this with RuntimeResourceRef-style accessors so impls can stage outputs, allocate resources, or surface CompletionHandles for async work. Today the struct only carries the dispatching Component’s reference so impls have a stable identifier they can log against.

Enums§

SelectParams
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. GlobalRegistry supports Random + All; DhtView supports NearKey).

Traits§

Aggregator
User-facing Contract trait for a federated/decentralized aggregator. The derive bridges these methods to the engine’s crate::roles::AggregatorRuntime trait.
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.
DataSource
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.
PeerSelector
User-facing Contract trait for a peer-selection protocol.