Skip to main content

Module wire

Module wire 

Source
Expand description

ai.bytesandbrains.wire v1 opset - engine-native.

Two ops, exactly one of which the user authors:

  • Send (user-facing): takes a payload + a typed peer input carrying a PeerId; resolves the peer to a multiaddr through ctx.peers.addresses, builds one SlotFill per non-peer input from the compiler-stamped dest_suffix metadata, ships the envelope, and returns (data, handle) - a structural-placeholder Trigger plus a freshly minted wire_req_id.

  • Recv (framework-synthesized): emitted on receiver partitions by [bb_compiler::synthesize_wire_recvs()]. Pure structural placeholder so the receiver’s FunctionProto stays a closed DAG and the consumer’s input value name resolves to a NodeSiteId the inbound deliver_fill writes into. The dispatch handler returns no outputs - Recv never lands on the frontier in normal flow.

Both ops register through the same path as every other syscall (Engine::register_syscall). There is no separate WireRuntime binding - wire is engine infrastructure, not a user role.

Structs§

RecvOp
Marker struct for register_syscall::<RecvOp>.
SendOp
Marker struct for register_syscall::<SendOp>.

Constants§

WIRE_DOMAIN
Wire opset domain.
WIRE_VERSION
Wire opset version.

Functions§

invoke
Send dispatch entry point matching StatelessInvokeFn.
invoke_recv
Recv dispatch entry point matching StatelessInvokeFn. Pure structural placeholder; downstream consumers are pushed onto the frontier when inbound data-plane delivery seeds the slot, not by this dispatch.