wolfram provides the low-level building blocks for speaking AT Protocol from
C: XRPC over HTTP, DID/handle resolution, repo signing, and MST/CBOR/CAR
handling. It is layered like the other SDKs in this ecosystem — a small
transport core, with identity and repo logic built on top rather than tangled
into it.
wolfram was chosen for three reasons:
- Tungsten. Wolfram is an older name for tungsten, a chemical element with symbol W (from the German Wolfram) and atomic number 74. Its important ores include scheelite and wolframite, the latter lending the element its alternative name.
- Low RAM. It's light on memory usage, and the codebase is structured to
stay that way:
- No runtime, no allocator, no GC. The C23 core builds and runs without a built-in allocator, event loop, or garbage collector — a long-lived firehose/Jetstream consumer has a flat, predictable heap profile rather than a sawtooth one.
- A small default dependency tree. A stock build only hard-requires
libcurland OpenSSL'slibcrypto.libsecp256k1,libzstd, andc-aresare optional and degrade gracefully. SQLite3, libsodium, libidn2, and libmicrohttpd are gated behindWOLFRAM_BUILD_*flags. - Explicit, documented ownership. Per
AGENTS.md, every heap-allocated output has a matching_freedocumented at the call site. No hidden allocation, no implicit ownership hand-off. - Borrowed views over copies. Generated Lexicon code borrows input
strings/arrays/references into caller-owned buffers, while only owning
decoders return heap objects with a
_output_free.
- Wolves. Wolves are cool.
The dominant AT Protocol SDKs are written in TypeScript
(bluesky-social/atproto) and Rust (rsky, indigo). wolfram is a C23
alternative, and that choice is deliberate rather than incidental:
- Tiny, predictable footprint. No runtime or allocator built in; no GC
pause, no
tokioreactor to size. - Trivial to embed.
libwolframlinks into a host app like zlib or SQLite — no Cargo workspace, nostdredistribution, no second toolchain to bridge. - Honest, explicit ownership. Documented ownership contracts in the header, readable by binding authors in any language.
- Selective dependency surface. Heavy dependencies are opt-in behind
WOLFRAM_BUILD_*flags; a Rust app tends to pull a much larger default tree. - Stable ABI, stable API. C's stable calling convention makes FFI straightforward and future-proof. Generated Lexicon clients are plain C structures and functions.
- Copyleft by default. AGPL-3.0, matching MetalBear: a modified
wolframrunning as part of a network service obliges its operator to offer users the corresponding source, the same way MetalBear itself does.
This is not a claim that C is universally better — the TypeScript and Rust
ecosystems have far richer tooling. wolfram targets the case where you want a
small, embeddable, dependency-light native core and are willing to do a little
more of the wiring yourself.