Skip to content

Commit a145cda

Browse files
committed
chore(rivetkit): remove wasm sqlite runtime
1 parent 4bd0fb1 commit a145cda

File tree

80 files changed

+869
-11315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+869
-11315
lines changed

CLAUDE.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ git commit -m "chore(my-pkg): foo bar"
103103
- Prefer targeted integration tests under `rivetkit-typescript/packages/rivetkit/tests/` over shared multi-driver matrices.
104104

105105
### SQLite Package
106-
- Use `@rivetkit/sqlite` for SQLite WebAssembly support.
107-
- Do not use the legacy upstream package directly. `@rivetkit/sqlite` is the maintained fork used in this repository and is sourced from `rivet-dev/wa-sqlite`.
108-
- The native SQLite addon (`@rivetkit/sqlite-native`) statically links SQLite via `libsqlite3-sys` with the `bundled` feature. The bundled SQLite version must match the version used by `@rivetkit/sqlite` (WASM). When upgrading either, upgrade both.
106+
- RivetKit SQLite runtime is native-only. Use `@rivetkit/rivetkit-native` and do not add `@rivetkit/sqlite`, `@rivetkit/sqlite-vfs`, or other WebAssembly SQLite fallbacks.
109107

110108
### RivetKit Package Resolutions
111109
- The root `/package.json` contains `resolutions` that map RivetKit packages to local workspace versions:
@@ -137,7 +135,7 @@ git commit -m "chore(my-pkg): foo bar"
137135
### Dynamic Import Pattern
138136
- For runtime-only dependencies, use dynamic loading so bundlers do not eagerly include them.
139137
- Build the module specifier from string parts (for example with `["pkg", "name"].join("-")` or `["@scope", "pkg"].join("/")`) instead of a single string literal.
140-
- Prefer this pattern for modules like `@rivetkit/sqlite-wasm`, `sandboxed-node`, and `isolated-vm`.
138+
- Prefer this pattern for modules like `@rivetkit/rivetkit-native/wrapper`, `sandboxed-node`, and `isolated-vm`.
141139
- If loading by resolved file path, resolve first and then import via `pathToFileURL(...).href`.
142140

143141
### Fail-By-Default Runtime Behavior
@@ -277,10 +275,8 @@ let error_with_meta = ApiRateLimited { limit: 100, reset_at: 1234567890 }.build(
277275
- If you need to add a dependency and can't find it in the Cargo.toml of the workspace, add it to the workspace dependencies in Cargo.toml (`[workspace.dependencies]`) and then add it to the package you need with `{dependency}.workspace = true`
278276

279277
**Native SQLite & KV Channel**
280-
- The native VFS uses the same 4 KiB chunk layout and KV key encoding as the WASM VFS. Data is compatible between backends.
281-
- **The native Rust VFS and the WASM TypeScript VFS must match 1:1.** This includes: KV key layout and encoding, chunk size, PRAGMA settings, VFS callback-to-KV-operation mapping, delete/truncate strategy (both must use `deleteRange`), and journal mode. When changing any VFS behavior in one implementation, update the other. The relevant files are:
282-
- Native: `rivetkit-typescript/packages/sqlite-native/src/vfs.rs`, `kv.rs`
283-
- WASM: `rivetkit-typescript/packages/sqlite-wasm/src/vfs.ts`, `kv.ts`
278+
- RivetKit SQLite is served by `@rivetkit/rivetkit-native`. Do not reintroduce SQLite-over-KV or WebAssembly SQLite paths in the TypeScript runtime.
279+
- The Rust KV-backed SQLite implementation still lives in `rivetkit-typescript/packages/sqlite-native/src/`. When changing its on-disk or KV layout, update the internal data-channel spec in the same change.
284280
- Full spec: `docs-internal/engine/NATIVE_SQLITE_DATA_CHANNEL.md`
285281

286282
**Inspector HTTP API**

docs-internal/rivetkit-typescript/ACTOR_KV_STRUCTURE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,4 @@ traces (7)/ # Traces namespace.
4545
data (1)/
4646
{bucket_start_sec}/
4747
{chunk_id} # fdb-tuple key: [1, bucket_start_sec, chunk_id].
48-
49-
sqlite (8)/ # SQLite VFS namespace.
50-
v1 (1)/ # SQLite data version. Legacy pre-v1 SQLite keys are still resolved in sqlite-wasm/src/vfs.ts.
51-
metadata (0)/
52-
{file_tag} # 0=main, 1=journal, 2=wal, 3=shm.
53-
chunks (1)/
54-
{file_tag}/
55-
{chunk_index_u32_be} # Byte-encoded keys, not fdb-tuple packed.
5648
```

docs-internal/rivetkit-typescript/DYNAMIC_ACTOR_SQLITE_PROXY_SPEC.md

Lines changed: 0 additions & 275 deletions
This file was deleted.

docs-internal/rivetkit-typescript/SQLITE_VFS.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)