Repository navigation
feat: binding support — API-017/API-018 and BrowserDb cursor (#462, #465, #467) - #468
Merged
Merged
Conversation
…rsor (#462, #465, #467) Language bindings can now report what Rust's types rule out with the core's own codes: MinigrafError::invalid_argument (API-017) for an argument a binding cannot convert, and MinigrafError::closed (API-018) for a log writer used after finish or close. BrowserDb.query returns a BrowserCursor (vars, nextBatch with JSON rows, close), matching Minigraf::query (API-012, API-010). The wasm32 test build compiles again: drop a duplicate page_cache_capacity and gate the tempfile-based dir_sync tests off wasm32. The binding shape shared by every binding repo is specified in docs/superpowers/specs/2026-10-07-binding-etl-surface-design.md. Refs #462, #465, #467 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
This was referenced Oct 7, 2026
Merged
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.
Core half of the binding work for #462 (cursors), #465 (
open_with_options) and #467 (LogWriter/FactRecord). The binding repos'v3branches pin this commit.Changes
API-017invalid argument: {}, fromMinigrafError::invalid_argument. A binding returns it for an argument it cannot convert, such as an entity id that is not a UUID string.API-018{} is closed, fromMinigrafError::closed. A log writer used afterfinishorclosereturns it. Rust consumes these objects, so the Rust API never returns either code.BrowserDb.query(datalog)returns aBrowserCursorwithvars(),nextBatch(maxRows)(JSON rows as inexecute(), orundefined) andclose().transact,retractandruleare API-012, and bind slots are API-010.docs/superpowers/specs/2026-10-07-binding-etl-surface-design.mddescribes the shape every binding shares, thev3branching, and which parts do not apply in the browser.page_cache_capacityand moveddir_sync'stempfiletests off wasm32. Without that fix the browser tests did not compile.Testing
cargo test: 1,337 passed, 9 ignored (one new unit test for the constructors).wasm-bindgen-testin headless Firefox: 12 passed, 3 of them new cursor tests. No CI job runs these./* ... */in theBrowserCursorJS example ended wasm-bindgen's generated JSDoc comment early and broke the glue JS.Refs #462, #465, #467
🤖 Generated with Claude Code
https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn