Modules¶
A module-by-module guide to the reference C++ implementation (core/). Each
page gives a one-paragraph summary, an extended description, the public interface
(real C++ signatures), and where the module sits. For the cross-cutting view see
the Interface Map; for the bytes on the wire see the
bit-level walkthrough.
A libtracer node is a set of modules linked together — there is no monolithic “core”. The implemented modules form a clean six-layer stack:
flowchart TB
subgraph L5["L5 · application"]
APP[your data / handlers]
end
subgraph L4["L4 · graph + transport"]
GRAPH["graph — vertices, read/write/await"]
DISP["dispatcher — fan-out + field-write"]
FWD["fwd-router — FWD source-routing (RFC-0004)"]
TRANSPORT["transport — loopback · UDP · WS · CAN"]
end
subgraph L23["L2/L3 · wire codec"]
FRAME["frame-codec — TLV decode/encode + CRC"]
end
subgraph L1["L1 · views"]
VIEWS["views — view_t / rope_t / cast"]
end
subgraph L0["L0 · substrate"]
SEG["segment — refcounted bytes + segment_ptr_t"]
BACK["backends — heap / borrowed / pool"]
end
APP --> GRAPH
GRAPH --> DISP --> FWD
FWD --> FRAME
FWD --> TRANSPORT
GRAPH -. "value IS a rope_t (scalar = 1 link)" .-> VIEWS
FRAME -- "cast, no copy" --> VIEWS
VIEWS --> SEG --> BACK
classDef done fill:#dcfce7,stroke:#166534;
class FRAME,VIEWS,SEG,BACK,GRAPH,DISP,FWD,TRANSPORT done;
The load-bearing idea: a TLV at L2 is a cast from an L1 view_t, and an L1 view_t is
a refcounted window onto L0 bytes. So the wire encoding, the in-memory value, and
the graph node are the same bytes — moving data in-process is a refcount bump,
not a copy.
Each module has its own page in the sidebar, grouped by layer:
L0 substrate — segment (refcounted bytes), backends (allocators)
L1 views — views (
view_t/rope_t/ the L1→L2 cast)L2/L3 wire codec — frame-codec (TLV decode/encode + CRC)
L4 graph — path (addressing), graph (vertices, read/write/await, dispatch)
L4 transport — transport (loopback · UDP · WS · CAN)
For the cross-cutting view of how they compose, see the interface map; for the exact bytes on the wire, the bit-level walkthrough.