granth-runtime-worker
v0.2.11
Published
Dedicated-worker runtime for granth. One elected tab owns the database; every tab can query it.
Downloads
1,790
Readme
granth-runtime-worker
The default runtime for granth.
Runs SQL in a dedicated Worker owned by exactly one tab, elected via Web Locks by opfs-leader.
Every other tab routes its calls to that tab.
This is the only runtime that can use OPFS, and the only one that keeps SQL off the main thread. Two tabs writing one OPFS file is what corrupted Notion's first WASM-SQLite rollout — this is the fix, not a mitigation.
Install
npm install granth-runtime-workerFull documentation: https://granthlabs.github.io
License
MIT
