Skip to main content

Crate bb_dsl

Crate bb_dsl 

Source
Expand description

Authoring DSL for bytesandbrains. Output handles, Contract traits, placeholders, and ConcreteComponent. Depends only on bb-ir. Module::build() records the composition tree into one ModelProto that bb-compiler consumes separately.

Re-exports§

pub use graph::Graph;
pub use module::BuildError;
pub use module::Module;
pub use output::Output;

Modules§

concrete
ConcreteComponent polymorphism contract — canonical home in bb-runtime::concrete. This module re-exports the type for authoring ergonomics so bb_dsl::concrete::ConcreteComponent keeps resolving.
contracts
User-facing Contract traits — canonical home is bb-runtime::contracts. This module re-exports the traits for authoring ergonomics so bb_dsl::contracts::Index etc. keep resolving.
graph
Recording context wrapping the in-progress FunctionProto. The proto is the IR — semantic BB attributes ride on proto fields, not a parallel Rust shadow store. See docs/IR_AND_DSL.md §2.
module
The Module trait. Module::build() produces one pre-compile ModelProto where functions[0] is the top-level body and functions[1..] are composed sub-Modules (deduped by name()).
output
Non-generic Output handle threaded through DSL method chains.
recorded
RecordedModule - the compiler’s input type.
syscalls
DSL-side syscall helpers — record canonical NodeProtos into a Graph. The runtime-side dispatch impls live in bb-ops; the two sides agree on stable (domain, op_type) string constants re-exported from bb_ir::syscall_ids.