Skip to main content

Module node

Module node 

Source
Expand description

Public Node + lazy build chain. Node — the framework’s runtime construct, installed via [bytesandbrains::install] and driven through Node::poll.

Lifecycle:

let model    = MyModule.build()?;
let compiled = bb::Compiler::new()
    .bind_backend::<CpuBackend>("compute")
    .compile(model)?;
let mut node = bb::install(peer_id, addr, compiled, &["MyModule"], bb::Config::new())?;
loop { node.poll(&mut cx); }

Construction-time validation (passport check, binding-table parse, concrete construction) surfaces InstallError at install time — the engine is ready to dispatch by the time Node::poll sees it.

Re-exports§

pub use config::NodeConfig;
pub use config::DEFAULT_BUS_CAPACITY;
pub use config::DEFAULT_CYCLE_OP_BUDGET;
pub use config::DEFAULT_INGRESS_BYTE_BUDGET;
pub use config::DEFAULT_MAX_APP_EVENT_BYTES;
pub use config::DEFAULT_MAX_COMPLETION_RESULT_BYTES;
pub use config::DEFAULT_MAX_INVOKE_BYTES;
pub use config::DEFAULT_MAX_INVOKE_INPUTS;
pub use config::DEFAULT_MAX_OUTBOUND_QUEUE;
pub use config::DEFAULT_MAX_PENDING_ASYNC;
pub use config::EDGE_INGRESS_BYTE_BUDGET;
pub use config::EDGE_MAX_APP_EVENT_BYTES;
pub use config::EDGE_MAX_COMPLETION_RESULT_BYTES;
pub use config::EDGE_MAX_INVOKE_BYTES;
pub use config::EDGE_MAX_INVOKE_INPUTS;

Modules§

config
Construction-time configuration for a Node.
derivation
Free fns that derive compiler-friendly summaries off a bare ModelProto. The chosen-path install constructs concrete instances via the inventory’s construct_fn at install time; the IR carries no instance state, so the only derivations the compiler + Node need are the generic-placeholder slot specs and the partition name.

Structs§

Node
Constructed BB Node ready to drive ML work. Produced by [bytesandbrains::install] — by the time the host holds one, the engine has resolved its dispatch table, registered every bound concrete, and installed the target function as the root graph.

Type Aliases§

TelemetryTap
Type-erased EngineStep observer installed onto a Node via Node::set_telemetry_tap. Each Node::poll call invokes the closure once per produced step.