Interface map¶
The cross-cutting view: what each module exposes, and who depends on whom. Every
type below is a real core/ C++ symbol. For prose on each, follow the links.
Dependency graph¶
Arrows point from a module to the module(s) whose interface it uses.
flowchart TD
APP["application / bench"]:::app
GRAPH["graph<br/><small>graph_t · vertex_t · role_t</small>"]
PATH["path<br/><small>path_t · path_key_t</small>"]
FWD["fwd-router<br/><small>fwd_router_t · child_registry_t</small>"]
TVERT["transport-vertex<br/><small>transport_vertex_t (/net)</small>"]
TRANSPORT["transport<br/><small>transport_t · loopback/UDP/TCP/WS/CAN</small>"]
FRAME["frame-codec<br/><small>tlv_t · decode/encode · crc</small>"]
VIEWS["views<br/><small>view_t · rope_t · decode(view_t)</small>"]
SEG["segment<br/><small>segment_t · segment_ptr_t</small>"]
BACK["backends<br/><small>mem_backend_t · heap/borrow/pool</small>"]
STATUS["status<br/><small>status_t · result_t<T></small>"]
APP --> GRAPH
APP --> FWD
GRAPH --> PATH
GRAPH --> VIEWS
GRAPH --> STATUS
FWD --> GRAPH
FWD --> FRAME
FWD --> TRANSPORT
TVERT --> FWD
TVERT --> GRAPH
VIEWS --> FRAME
VIEWS --> SEG
FRAME --> STATUS
SEG --> BACK
BACK --> SEG
PATH --> STATUS
classDef app fill:#fce7f3,stroke:#9f1239;
classDef lib fill:#dcfce7,stroke:#166534;
class GRAPH,PATH,FWD,TVERT,TRANSPORT,FRAME,VIEWS,SEG,BACK,STATUS lib;
The seams (who hands what to whom)¶
flowchart LR
subgraph fwd["remote op (FWD source-routing, RFC-0004)"]
direction TB
W1["client: FWD{op, dst=/net/<module>/<name>/<peer path>, src, payload?}"] --> W2["fwd_router: peek the leading dst segment run (offset, no decode)"]
W2 --> W3["child_registry_t::longest_prefix → transport"]
W3 --> W4["strip the matched dst run · grow src (pooled head) · scatter-gather send"]
end
subgraph term["terminus (dst empty → this node)"]
direction TB
R1["transport receiver(bytes)"] --> R1a["wire::decode_into(frame, block_source_t&)"]
R1a --> R1b["tlv_arena_t (span nodes)"]
R1b --> R2["op_resolver_t::resolve"]
R2 --> R3["read/write/await the local vertex"]
R3 --> R4["FWD{REPLY} direct-emitted, source-routed back via src"]
end
fwd -. "each hop over the wire" .-> term
Consolidated interface reference¶
Module |
Key public interface |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transport-vertex |
|
Two contracts hold the stack together¶
A TLV is a cast from a
view_t— thedecode(view_t)overload =decode(view.bytes()). The decoder borrows; theview_t’ssegment_ptr_towns. So L2 (bytes) and L1 (ownership) meet with no copy.A
segment_tis reclaimed by its backend — the onlymem_backend_t→segment_tedge isdestroy, fired bysegment_ptr_tat refcount zero. So L0 (allocation) and L1 (lifetime) meet with no policy baked into the core.
Everything above L1 (graph, fwd-router, transports) traffics in view_ts and
tlv_ts, never raw allocation — which is why a new backend, transport, or vertex
role slots in without touching the others.
Net-plane scope¶
The net plane is the RFC-0004 remote-operation plane: fwd_router_t + child_registry_t,
op_resolver_t and route_handle_t carry path-addressed read / write / await /
subscribe over FWD, and a connection is itself a vertex at /net/<module>/<name>
(transport_vertex_t, ADR-0027). The socket transports are WebSocket, UDP, TCP and CAN;
udp, tcp and ws are also registered as /net connection kinds, while CAN is bound
as a transport_t directly. QUIC and WebTransport are built when
LIBTRACER_WITH_QUIC configures the libtracer_quic module, which extends the kind
catalog through register_transport_type rather than being compiled into
transport_vertex.cpp. Per-module and per-implementation coverage is enumerated in the
generated capability matrix; this page does not restate it.
The net plane is explicit-source-routed FWD only
(ADR-0040 — the net plane is explicit-source-routed only):
a remote endpoint is addressed by its full path through transport-vertices
(/net/<module>/<name>/<peer path>), each hop stripping the dst segment run that named
its own link. There is no flooding and no (origin, ts) dedup — parallel links to one
peer are different explicit addresses (deliberate redundancy), not auto-multipath.
0x0D ROUTER is a reserved, decodable wire code with no implemented mechanism; FWD
source-routing needs no dedup.
Pitfalls¶
This table is a hand sketch, not the generated truth. Each module page carries an
## API referenceblock generated from the headers; where the two disagree, the generated block is the one that was compiled. A signature read off this page and not off the header is a signature that may have moved.fwd_router_ttakes four independent allocation seams, not one.mrfunds theroute_handlelabel tables;rxfunds the terminus arena, which is built from a peer’s frame behind no ACL;flatfunds every rope flatten on the forward and terminus paths, including the terminus rope-tier ownership copy, which is likewise peer-driven;egressfunds the reply egress. Each defaults to the global heap independently, so bounding onlymrandrxstill leaves two peer-reachable allocations unbounded. Themr/rxsplit exists because astd::pmr::memory_resourcecannot report exhaustion by value, so a nothrowmem::block_source_tis what turns an over-large frame into aTLV_NESTING_TOO_DEEPreject instead of anabort()under-fno-exceptions(ADR-0065).A connection’s routing key is the whole
net/<module>/<name>run, not one segment.by_name/by_segmentresolve a single link NAME and scan globally; the forward path matches the multi-segment run withlongest_prefix, one pass, each slot matched against the prefix of its ownseg_count(by_segmentswas removed with the mount-width lift, #523). Code that assumes the firstdstsegment names the link addresses a connection that no longer exists at that shape.child_registry_t::erasetombstones, it does not compact. The slot’slinkis nulled and its NAME kept, so a racing lock-free reader sees the old pointer ornullptrand never a shifted vector. A re-addof the same name reuses the tombstone; a new name appends, so the table’s high-water mark is the count of distinct names ever registered.