Skip to content

Commit 2611ad0

Browse files
committed
test(rivetkit): remove wasm sqlite-only fixtures and coverage
1 parent 8a620d1 commit 2611ad0

File tree

16 files changed

+18
-1210
lines changed

16 files changed

+18
-1210
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
```

examples/kitchen-sink/scripts/bench-sqlite.ts

Lines changed: 4 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rivetkit-typescript/CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Tree-Shaking Boundaries
44

55
- Do not import `@rivetkit/workflow-engine` outside the `rivetkit/workflow` entrypoint so it remains tree-shakeable.
6-
- Do not import SQLite VFS or `@rivetkit/sqlite` outside the `rivetkit/db` (or `@rivetkit/sqlite-wasm`) entrypoint so SQLite support remains tree-shakeable.
7-
- Importing `rivetkit/db` (or `@rivetkit/sqlite-wasm`) is the explicit opt-in for SQLite. Do not lazily load SQLite from `rivetkit/db`; it may be imported eagerly inside that entrypoint.
8-
- Core drivers must remain SQLite-agnostic. Any SQLite-specific wiring belongs behind the `rivetkit/db` or `@rivetkit/sqlite-wasm` boundary.
6+
- Keep SQLite runtime code on the native `@rivetkit/rivetkit-native` path. Do not reintroduce WebAssembly SQLite or KV-backed VFS fallbacks.
7+
- Importing `rivetkit/db` is the explicit opt-in for SQLite. Do not lazily load extra SQLite runtimes from that entrypoint.
8+
- Core drivers must remain SQLite-agnostic. Any SQLite-specific wiring belongs behind the native database provider boundary.
99

1010
## Context Types Sync
1111

rivetkit-typescript/packages/rivetkit/fixtures/driver-test-suite/actors/dbKvStatsActor.ts

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

rivetkit-typescript/packages/rivetkit/fixtures/driver-test-suite/actors/sleepWsRawDbAfterClose.ts

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

0 commit comments

Comments
 (0)