API reference
The Zig reference is generated from the library’s declarations each time the site builds. The C headers are generated too, and a build check rejects a stale one. To choose an API, start with Choose an API. To build a first client, use Start building.
The Zig API
The Zig API reference documents the public glowcap module imported by applications. Ownership and lifetime notes live with the declarations they govern. The modules explains how those declarations are divided by responsibility.
The C ABI
The C ABI is split into composable archives. Each generated header describes one archive and includes only the shared definitions it needs.
| Archive | Header | What it carries |
|---|---|---|
libglowcap_ocapn | glowcap_ocapn.h | shared contexts, frames, values, locators, and URI helpers |
libglowcap_host | glowcap_host.h | the Host, which your program feeds bytes (glowcap_host_*) |
libglowcap_driver | glowcap_driver.h | the C driver loop, which adopts a Host from libglowcap_host through glowcap_driver_take_host. It exports only glowcap_driver_* |
libglowcap_loam | glowcap_loam.h | storage core for objects and names on an existing Host, using a storage archive or callbacks supplied by your application |
libglowcap_loam_lmdb | glowcap_loam_lmdb.h | optional LMDB storage for Loam. It creates or reopens the database at startup and runs the storage work you hand it |
libglowcap_loam_sqlite | glowcap_loam_sqlite.h | optional SQLite storage for Loam, with the same verbs as the LMDB archive. It creates or reopens the database file at startup and runs the storage work you hand it |
libglowcap_loam_volatile | glowcap_loam_volatile.h | optional in-memory storage for Loam, with the same verbs as the LMDB archive. It takes no path, and its store ends at release |
libglowcap_net_transport_iroh | glowcap_net_transport_iroh.h | encrypted QUIC. It is optional and links a Rust library. |
libglowcap_net_transport_webrtc | glowcap_net_transport_webrtc.h | peer-to-peer WebRTC DataChannel. It is optional and links a Rust library. |
libglowcap_net_transport_onion | glowcap_net_transport_onion.h | Tor onion services over a daemon you run |
libglowcap_net_transport_relay | glowcap_net_transport_relay.h | the keyed-relay and end-to-end sealed noise-relay transports |
libglowcap_net_transport_tcp | glowcap_net_transport_tcp.h | the noise-tcp, keyed-tcp, and testing tcp transports, plus low-level framed TCP endpoints |
libglowcap_net_transport_inproc | glowcap_net_transport_inproc.h | in-process byte pipes, no sockets |
Each driver and transport header #includes glowcap_ocapn.h, declares only its own functions, and expects its archive to be linked alongside libglowcap_ocapn. For build instructions and a complete C program, read consuming glowcap from C.