Mirror of github.com/ewanc26/wolfram
  • C 93.9%
  • C# 3.5%
  • Python 1%
  • C++ 0.8%
  • CMake 0.8%
Find a file
2026-07-16 18:24:00 +01:00
.devdeps feat(platform): add amd64/arm32 devdeps and document platform support 2026-07-10 03:18:44 +01:00
.github chore(ci): update actions for Node 24 2026-07-10 09:24:40 +01:00
cpp chore(cpp): regenerate wrapper owners for new handle types 2026-07-11 14:54:26 +01:00
docs docs(roadmap): update Wii backend status 2026-07-11 16:17:09 +01:00
dotnet feat(bindings-csharp): generate SafeHandles from C headers and wire pre-build 2026-07-10 00:08:01 +01:00
examples fix(feed): parse getFeed as feedViewPost; add timeline/thread params 2026-07-11 13:25:35 +01:00
include/wolfram feat(platform): implement Wii runtime primitives 2026-07-11 15:53:28 +01:00
lexicons feat: add richtext, firehose, full lexicon coverage, and OAuth example 2026-07-06 04:57:47 +01:00
src fix(crypto): provide honest Wii did-key stubs 2026-07-11 16:10:07 +01:00
test fix(store): persist label negation/cid/ver/exp and session pds_url 2026-07-11 14:14:13 +01:00
third_party feat(embed): integrate stb_image for image aspectRatio + wf_image_dimensions 2026-07-08 19:06:54 +01:00
tools fix(lexgen): handle union array cleanup correctly 2026-07-10 22:11:26 +01:00
.gitattributes Initial commit: wolfram repository scaffold 2026-07-05 00:21:16 +01:00
.gitignore chore: remove tracked Testing/ CTest artifacts and ignore the directory 2026-07-07 21:01:32 +01:00
AGENTS.md docs: update Wii platform guidance 2026-07-16 18:24:00 +01:00
CMakeLists.txt feat(platform): implement Wii runtime primitives 2026-07-11 15:53:28 +01:00
CONTRIBUTING.md docs(contributing): allow human co-author trailers; only automated commits should omit them 2026-07-07 21:53:50 +01:00
LICENSE Initial commit: wolfram repository scaffold 2026-07-05 00:21:16 +01:00
README.md docs(roadmap): update Wii backend status 2026-07-11 16:17:09 +01:00
TRADEMARKS.md docs: clarify AT Protocol trademark use 2026-07-16 14:14:08 +01:00

wolfram

A C SDK for the AT Protocol — a client-side, wire-level implementation of the
protocol, not a port of the upstream atproto service backends.

The runtime library and all generated client code are pure C11. The optional
Lexicon generator is a development-time Python tool and is never linked into,
embedded in, or required by applications using libwolfram.

Scope. Wolfram is a faithful C port of the AT Protocol's protocol/SDK
layer
— the client and wire-format packages of the upstream TypeScript
repository (@atproto/api, xrpc, identity, repo, crypto, syntax,
oauth, lex, lexicon, did, ws-client). It does not port the
upstream server-side service backends (pds, bsky AppView, ozone,
bsync), which are application servers (databases, business logic, hosting)
rather than protocol SDK code. The optional WOLFRAM_BUILD_SERVER component is
a generic XRPC server framework (routing, auth, SSE, WebSocket, relay, blob
store) you can build a service on top of — it is not itself a PDS, AppView, or
Ozone implementation.

Protocol parity: The bundled Lexicon snapshot matches the 394 files in the
upstream atproto repository. Generated C11 and OAuth-authenticated clients cover
all 312 query/procedure endpoints, and dedicated streaming clients cover all
three subscription endpoints. CI enforces this complete wire-level coverage.

Status: Broad, multi-layer client coverage is implemented and tested —
transport (XRPC/WebSocket), identity (DID/handle + com.atproto.identity
typed wrappers), repo (DAG-CBOR/CAR/MST), agent (com.atproto.* + chat/ozone/
moderation), OAuth (DPoP/PAR), sync (firehose + Jetstream), moderation, DID PLC
ops, rich text, syntax/validate/json, labeler service coverage,
app.bsky.video typed wrappers (job status / upload limits / upload),
notification v2 + activity subscriptions, optional SQLite store persistence,
app.bsky.graph write wrappers (wf_agent_graph_*: mute/unmute thread +
actor-list, block/list/listitem/starterpack/listblock create/update/delete),
and higher-level endpoint examples. Wire-level coverage of the protocol is
complete; the upstream service backends (PDS, AppView, Ozone, bsync) are out
of scope, as described under Scope above.

Beyond the client surface above, the SDK also ships streaming/infra modules —
jetstream (filtered Jetstream subscription with cursor reconnect/backoff),
sync_publish (firehose event production, the inverse of sync_subscribe),
blob_store (blob persistence/serving), and relay_server / feedgen_server
(libmicrohttpd helpers) — plus dedicated *_typed parser/wrapper families
across every lexicon namespace (including honest actor_status_typed stubs
where the lexicon defines only a record). OAuth additionally covers
resource-server token verification. See AGENTS.md (Current state)
for the full per-module status.
The optional libmicrohttpd-backed XRPC server (WOLFRAM_BUILD_SERVER=ON)
supports route registration, auth middleware, a token-bucket rate limiter,
Server-Sent Events (SSE) streaming, and WebSocket (RFC 6455) subscription
endpoints for subscription-style feeds. A feed-generator skeleton server helper
(feedgen_server.h) and a generic upstream→downstream WebSocket subscription
relay (relay_server.h, forwarding raw frames from an upstream ws(s)://
subscription such as com.atproto.sync.subscribeRepos or
com.atproto.label.subscribeLabels) are provided.

Documentation

Per-module usage guides (runnable C snippets):

Topic guides:

Quick start

cmake -S . -B build && cmake --build build && ctest --test-dir build
./build/create_post https://bsky.social you@example.com yourpassword "Hello from wolfram!"

wolfram is organized into small, layered modules — transport → identity →
repo → agent. See docs/modules.md for the full status table.

Cross-compilation Support

Cross-compilation targets for Nintendo platforms and other architectures are supported:

Wii

A cross-compilation target for the Nintendo Wii (devkitPPC/libogc) is
supported. The Wii build is client-only — server modules, OAuth flows,
and desktop dependencies (libcurl, OpenSSL, pthreads) are excluded.

cmake -S . -B build-wii \
  -DCMAKE_TOOLCHAIN_FILE=.devdeps/wii.cmake \
  -DWOLFRAM_BUILD_WII=ON \
  -DCMAKE_BUILD_TYPE=Debug
cmake --build build-wii

Requires devkitPro with devkitPPC and libogc
installed. The toolchain file is at .devdeps/wii.cmake.

Wii U

A cross-compilation target for the Nintendo Wii U (devkitPPC/wut) is
supported.

cmake -S . -B build-wiiu \
  -DCMAKE_TOOLCHAIN_FILE=.devdeps/wiiu.cmake \
  -DWOLFRAM_BUILD_WIIU=ON \
  -DCMAKE_BUILD_TYPE=Debug
cmake --build build-wiiu

Requires devkitPro with devkitPPC and the wut SDK
installed. The toolchain file is at .devdeps/wiiu.cmake.

3DS

A cross-compilation target for the Nintendo 3DS (devkitARM/libctru) is
supported.

cmake -S . -B build-3ds \
  -DCMAKE_TOOLCHAIN_FILE=.devdeps/3ds.cmake \
  -DWOLFRAM_BUILD_3DS=ON \
  -DCMAKE_BUILD_TYPE=Debug
cmake --build build-3ds

Requires devkitPro with devkitARM and libctru
installed. The toolchain file is at .devdeps/3ds.cmake.

Windows

A cross-compilation target for Windows (MinGW-w64) is supported.

cmake -S . -B build-windows \
  -DCMAKE_TOOLCHAIN_FILE=.devdeps/windows.cmake \
  -DWOLFRAM_BUILD_WINDOWS=ON \
  -DCMAKE_BUILD_TYPE=Debug
cmake --build build-windows

Requires MinGW-w64. The toolchain file is at .devdeps/windows.cmake.

Linux (ARM64)

A cross-compilation target for Linux on AArch64 is supported (e.g. from
x86_64 macOS/Linux to ARM64 Linux).

cmake -S . -B build-aarch64 \
  -DCMAKE_TOOLCHAIN_FILE=.devdeps/linux-aarch64.cmake \
  -DCMAKE_BUILD_TYPE=Release
cmake --build build-aarch64

The toolchain file is at .devdeps/linux-aarch64.cmake. Toolchains for
additional architectures (arm32.cmake, amd64.cmake) are also provided
under .devdeps/.

The Wii platform abstraction now implements libogc networking initialisation,
LWP mutexes, and monotonic timing, and a complete Channel Blue executable links
against the cross-compiled SDK. Wii HTTPS/WebSocket and crypto/did:key backends
remain honest WF_ERR_NOT_IMPLEMENTED stubs. Wii U and 3DS platform, transport,
and crypto backends remain stubbed. The Windows target is fully implemented
against the Win32 API.

For consoles (Wii, Wii U, 3DS), the builds are client-only — server modules,
OAuth flows, and desktop dependencies (libcurl, OpenSSL, pthreads) are excluded.

Contributing

See CONTRIBUTING.md.

License

MIT