Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

bb::Bootstrap — optional Component initialization phase.

Components override Bootstrap::bootstrap() to record one-shot setup logic the framework fires before any body-phase op invokes their Contract methods. Backends use this to wire backend-native tensor pools; indexes use it to mmap their on-disk state; codecs that need a calibration pass use it to drain a sample buffer.

The trait default is a no-op so existing Components (Backend, Codec, Index, Aggregator, …) need no change. Authors opt in by implementing the trait alongside their primary Contract — the framework drives Bootstrap ahead of body ops when any of the Component’s other Contract methods is reachable from a queued target.

Today the trait ships with its types only; F5 wires the Component bootstrap dispatch path (registration + per-poll seeding). Sibling tests assert the default no-op + override observability.

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.

Traits§

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.