Repository navigation
v0.0.1 — first release
A Go implementation of the Yjs CRDT, wire-compatible with the JavaScript reference, for backends that need to serve Yjs to browsers.
go get github.com/antst/go-yjs@v0.0.1
Requires Go 1.24+. No runtime dependencies.
Version numbering starts fresh
This began as a fork of skyterra/y-crdt, whose copyright is retained in LICENSE — but it is a different product now. The V2 codec, the sync and awareness protocol package, the backend ports and their conformance suites, the differential oracle and the fuzz targets were all added here; 60 Go files became 260. Continuing that version line would imply a continuity that does not exist.
What is proven
Compatibility with yjs@13.6.31 is enforced by a differential oracle, not by hand-written expectations: random operation sequences run through both implementations and the results are compared byte for byte across 13 surfaces, in both directions, on every push — 20,000 seeds per push, tiers to 10,000,000.
Direction B is the half that matters most: only bytes produced here and decoded by the reference can catch a non-canonical encoding.
- Both V1 and V2 update codecs complete and byte-exact, including delta-coded delete sets
- Twenty native fuzz targets over every entry point accepting untrusted bytes — no panic, no hang, allocation bounded by input length
- Whole-module race detector, lint, and vet in both build configurations gate every push
- Faster than yjs, yrs and ygo on 49 of 54 matched benchmarks in a bracket-certified run
Why 0.0.1 and not 1.0
The CRDT core is well evidenced. The backend layer is not.
backend/{persistence,cluster,memory,hub,conformance}, Registry.Invalidate and Handle.Done were written days before this tag. They have conformance suites and a worked single-process example that runs in CI, and they have never served a real client. Nothing here has run for an hour, while a collaboration server runs for weeks — elapsed time is the dimension with no evidence behind it.
The API is also still moving: NewDoc changed shape and ToDOM was removed in the week of this release.
Treat crdt/ and protocol/ as ready to build on, and backend/ as code you are co-developing. Run your own store against backend/conformance before trusting it, and get a long-running instance up early.
Layout
| Package | What it is |
|---|---|
crdt |
Documents, shared types, update encoding, transactions, snapshots, undo |
protocol |
Sync and awareness message framing |
backend/persistence |
Port you implement — SQL, files, object store |
backend/memory, backend/hub |
Shipped in-process defaults, replaceable |
backend/cluster |
Optional. A single process is first-class |
backend/conformance |
Public suites to check your implementation against |