Expand description
Global inventory-collected registry for custom ops.
Global registries collected via inventory.
lives in bb_ir::registry (foundation, shared by bb-dsl and
bb-runtime). This module re-exports it and adds the custom-op
registry, which depends on runtime-side types (RuntimeResourceRef,
OpError, DispatchResult) and therefore stays alongside the
engine.
See the module-level docs in bb_ir::registry for the
concrete-component half’s authoring patterns. The custom-op
registry follows the same inventory::submit! pattern; the
bb::register_op!{} declarative macro emits the submission for
library makers.
Modules§
Structs§
- Bootstrap
Dispatcher Registration - Per-concrete inventory carrying a per-T Bootstrap dispatcher-
registration fn pointer. The
#[derive(bb::Concrete)]macro emits one of these per registered concrete so the install path can register every concrete’sBootstrapdispatcher without the per-T downcast. Pairs withcrate::engine::Engine::register_bootstrap_dispatcher. - Component
Role Binding - Per-
(component_type, role)inventory entry: each#[derive(bb::<Role>)]proc-macro emits one of these alongside the universal triple.Node::ensure_readywalks the channel + joins bytype_nameto compute the role bitflags per concrete component. - Concrete
Component Registration - Inventory entry for a concrete component, keyed by
TYPE_NAME. - Dependency
Decl - Author-declared sibling dependency at a named slot. Compiler
verifies role match; runtime reaches it via
RuntimeResourceRef::dependency::<T>(slot). - Dispatcher
Registration - Per-
(component_type, role)inventory carrying a per-T dispatcher-registration fn pointer. Each role derive emits one of these alongsideComponentRoleBinding;install()walks the channel + callsregister_fn(engine)for each bound concrete so the engine learns about every role dispatcher without the install path needing the typed&T. - OpRegistration
- Single inventory entry covering every op the framework
dispatches. Library makers ship via
bb::register_op!; bb-ops’s syscalls submit directly. Engine dispatch keys on(domain, op_type)— no TypeId lookup. - Storage
Type Entry - Per-concrete Storage-type entry registered by
#[derive(bb::<Role>)].
Enums§
- Component
Role - One concrete framework role a component declares.
- Registration
Kind - User-custom vs framework-syscall discriminator on
OpRegistration. Iterators surface entries filtered by kind.
Functions§
- bootstrap_
dispatcher_ for - Look up the Bootstrap dispatcher-registration fn for
type_name.install()calls this for every registered concrete so the Component bootstrap fire path can dispatch through the right impl. ReturnsNonewhen the concrete was registered without the#[derive(bb::Concrete)]Bootstrap-bridge emission. - concrete_
components - Iterate every concrete-component registration this binary links.
- dispatcher_
for - Look up the dispatcher-registration fn for
(type_name, role).install()calls this for every binding in the artifact’sBindingSpec. ReturnsNonewhen the role derive isn’t present in this binary’s inventory (e.g. a hand-implemented role trait without the derive). - find_
concrete_ component - Look up a concrete by
TYPE_NAME.Nonewhen unregistered in this binary. - find_op
- Look up a Custom-kind op by its
(domain, op_type)key. Used by the engine’s dispatch fallback for user-shipped ops outside the role surface. - framework_
syscalls - Iterate every Syscall-kind registration. Consumed by
Engine::register_all_framework_syscallsat Node construction time. - iter_
storage_ types - Iterate every registered Storage-type entry in this binary.
- lookup_
storage_ type - Look up the
TypeNodefor a specific(concrete_type_name, role_runtime, port)triple. - ops
- Iterate every Custom-kind op registration this binary links in.
- roles_
for_ component - Iterate every role binding for a given component type. Used by
Node::ensure_readyto compute the bitflags + by introspection tools to discover what roles a struct implements.
Type Aliases§
- OpInvoke
Fn - Type-erased dispatch fn for any op (custom OR syscall).