Skip to main content

Module backend

Module backend 

Source
Expand description

BackendRuntime - framework-internal role trait for backend implementations.

Backend’s atomic opset IS ai.onnx v1, and the role op_types ARE the atomic ops. Every ai.onnx::* node goes straight to the atomic dispatch table.

Authoring API is the Contract trait, not this one. Concrete backends implement crate::contracts::Backend (the 30 mandatory primitives + execute(&GraphProto, …)); the #[derive(bb::Backend)] proc-macro generates the matching impl BackendRuntime that bridges into the engine’s atomic-dispatch table. Library makers don’t write impl BackendRuntime by hand.

Distinct from [bb_dsl::placeholders::Backend] - the placeholder unit struct Module authors embed as a generic placeholder slot.

Traits§

BackendRuntime
Role trait for backend implementations. Universal contract per docs/ROLES.md §2 with no per-role methods (Backend’s role opset is ai.onnx v1 which IS its atomic opset).