Carve the engine into zigstore v1.0.0; consume it as a dependency#6
Merged
Conversation
…s the zigstore dependency
poly-glot
added a commit
that referenced
this pull request
Jun 7, 2026
Carve the engine into zigstore v1.0.0; consume it as a dependency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracts dmozdb's generic DB/server engine into the standalone
zigstorelibrary (pinned at thev1.0.0tarball + content hash) and rewires dmozdb to consume it. Big-bang, landed as one validated PR perdocs/superpowers/specs/2026-06-06-zigstore-library-extraction-design.mdand its implementation plan.What changed
database.zig→ appDirectorycomposingzigstore.Engine(schema)'s*Store; the 11 indexes / 6 memtables / 3 counters are now a comptime schema.types.zigsplit intozigstore.codec+ appschema.zig;changesetcodec →zigstore.wire_codec; binary-protocol framing →zigstore.protocol; epoll/bootstrap →zigstore.run;gen_client_ts→ azigstore.tsgendriver.@import("zigstore")(one-way boundary, verified).recoverhooks,spawnWorkerticks, thecommitctxcallback,processFramesdispatch,SnapshotHost.Behavior preserved
web/lib/dmoz-protocol.gen.ts) are byte-identical; the server boots end to end (bootstrap Top=1, 5 epoll reactors).RESPONSE_RESERVEis now an app-supplied worst-case bound (restored from the regressed 64 KiB hardcode), with a regression test.store.dat, schema-generated header) — production needs a data re-seed via the importer.Follow-ups (non-blocking)
Store.drainMemtable(name)seam so the app stops duplicatingdrainOneInner; move WAL truncate-after-checkpoint intoStore.deinitto drop the shutdown double drain/flush.