fix: respect wasm load config params when instantiating sqlite - #24937
Merged
Conversation
Thunkar
approved these changes
Jul 23, 2026
mverzilli
force-pushed
the
martin/triage-200
branch
from
July 23, 2026 14:06
77b0c0f to
c44762c
Compare
mverzilli
enabled auto-merge (squash)
July 23, 2026 14:26
Collaborator
|
❌ Failed to cherry-pick to |
This was referenced Jul 23, 2026
rangozd
pushed a commit
to rangozd/aztec-packages
that referenced
this pull request
Aug 5, 2026
…Protocol#24937) The sqlite3mc we vendor clobbers config params used to find the sqlite wasm file to load. As a result, the bundler-visible default wasm URL was silently discarded on the first call in a given env and wasmBinary was never honored at all. We introduce an index.ts wrapper that takes care of ensuring options survive the first call and every call after. It honors `locateFile`, `wasmBinary`, and `instantiateWasm`, and it defaults to a static `SQLITE3_WASM_URL` that bundlers rewrite to their emitted asset. (We need to follow this up with some simplification of aztec-kit) Closes TRIAGE-200 Fixes AztecProtocol#24895
rangozd
pushed a commit
to rangozd/aztec-packages
that referenced
this pull request
Aug 5, 2026
…ztecProtocol#24937) (AztecProtocol#24944) ## Summary Port of AztecProtocol#24937 to `next`. The cherry-pick conflicted in `yarn-project/sqlite3mc-wasm/src/index.ts` because `next` still had the simple sqlite3mc re-export while the source PR replaced it with an init wrapper. I resolved the conflict by using the wrapper from the source PR so `locateFile`, `wasmBinary`, and `instantiateWasm` survive sqlite initialization, while retaining the package's existing exported sqlite types. `origin/port-to-next-staging` was not present after repeated fetches, so this PR targets `next` directly instead of a missing staging base. Fixes AztecProtocol#24895 ## Tests - `yarn install --immutable` - `yarn workspace @aztec/foundation build` - `yarn workspace @aztec/sqlite3mc-wasm test src/index.test.ts` - `yarn workspace @aztec/sqlite3mc-wasm build` Full `yarn build` was attempted, but this fresh checkout lacked generated repo-wide artifacts such as `@aztec/l1-artifacts`; the narrower sqlite workspace build passed after restoring the required ignored local artifacts for testing. Closes AztecProtocol#24895 --- *Created by [claudebox](https://claudebox.work/v2/sessions/597504b9b3d7d66e/jobs/1) · group: `slackbot` · [Slack thread](https://aztecprotocol.slack.com/archives/C0AGN2WT3CP/p1784817938944179?thread_ts=1784817938.944179&cid=C0AGN2WT3CP)*
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.
The sqlite3mc we vendor clobbers config params used to find the sqlite wasm file to load.
As a result, the bundler-visible default wasm URL was silently discarded on the first call in a given env and wasmBinary was never honored at all.
We introduce an index.ts wrapper that takes care of ensuring options survive the first call and every call after. It honors
locateFile,wasmBinary, andinstantiateWasm, and it defaults to a staticSQLITE3_WASM_URLthat bundlers rewrite to their emitted asset.(We need to follow this up with some simplification of aztec-kit)
Closes TRIAGE-200
Fixes #24895