Skip to content

chore(rivetkit): replace wa-sqlite with @rivetkit/sqlite#4266

Closed
NathanFlurry wants to merge 1 commit intographite-base/4266from
02-23-chore_rivetkit_replace_wa-sqlite_with_rivetkit_sqlite
Closed

chore(rivetkit): replace wa-sqlite with @rivetkit/sqlite#4266
NathanFlurry wants to merge 1 commit intographite-base/4266from
02-23-chore_rivetkit_replace_wa-sqlite_with_rivetkit_sqlite

Conversation

@NathanFlurry
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link

railway-app bot commented Feb 23, 2026

🚅 Deployed to the rivet-pr-4266 environment in rivet-frontend

Service Status Web Updated (UTC)
mcp-hub ✅ Success (View Logs) Web Feb 23, 2026 at 8:27 am
website ❌ Build Failed (View Logs) Web Feb 23, 2026 at 8:26 am
ladle ❌ Build Failed (View Logs) Web Feb 23, 2026 at 8:26 am
frontend-inspector ❌ Build Failed (View Logs) Web Feb 23, 2026 at 8:26 am
frontend-cloud ❌ Build Failed (View Logs) Web Feb 23, 2026 at 8:26 am

Copy link
Member Author

NathanFlurry commented Feb 23, 2026


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Feb 23, 2026

PR Review: chore(rivetkit): replace wa-sqlite with @rivetkit/sqlite

Overall this is a clean, well-scoped change. The dependency swap is straightforward and the documentation restructuring is a clear improvement.


Issues

Stale wa-sqlite references in comments (minor)

The package swap is incomplete in one sense: several files outside the changed set still name wa-sqlite in code comments. Developers reading these files will see a package name that no longer exists in dependencies:

  • rivetkit-typescript/packages/rivetkit/src/db/mod.ts:81// Ensure wa-sqlite calls are not concurrent
  • rivetkit-typescript/packages/rivetkit/src/db/drizzle/mod.ts:59-60, 92, 189, 243 — multiple wa-sqlite references
  • rivetkit-typescript/packages/rivetkit/src/db/config.ts:39// wa-sqlite is not re-entrant
  • rivetkit-typescript/packages/rivetkit/src/inspector/actor-inspector.ts:118// Serialize all queries to avoid concurrent wa-sqlite access
  • rivetkit-typescript/packages/rivetkit/src/actor/instance/mod.ts:1412-1413// wa-sqlite build is not re-entrant
  • rivetkit-typescript/packages/rivetkit/src/actor/driver.ts:75// wa-sqlite's async build
  • rivetkit-typescript/packages/rivetkit/src/drivers/file-system/actor.ts:86// The async wa-sqlite build

These should be updated to reference @rivetkit/sqlite (or just "sqlite") for consistency.

Type declaration file naming (minor)

rivetkit-typescript/packages/sqlite-vfs/src/wa-sqlite.d.ts still carries the old name despite now declaring types for @rivetkit/sqlite. Renaming it to sqlite.d.ts or similar would make the codebase less confusing when someone greps for wa-sqlite.


Observations

@rivetkit/sqlite not in root pnpm resolutions

Per the repo conventions in CLAUDE.md, workspace-local @rivetkit/* packages go into the root package.json resolutions. @rivetkit/sqlite is absent from that block, which suggests it is intended to be a published external package rather than a workspace package. If that is intentional, it is fine—just worth confirming, since all other @rivetkit/* packages in use are local workspace packages resolved there.

serverExternalPackages in the Next.js example

The addition of ["@rivetkit/sqlite", "@rivetkit/sqlite-vfs"] is correct. Both involve WASM/native bindings that Next.js's bundler cannot process. Including @rivetkit/sqlite-vfs alongside @rivetkit/sqlite avoids a common pitfall where only the direct dependency is externalized but its transitive WASM-using dep is still bundled.

Documentation restructuring

The reorganization of multiplayer-game.mdx into top-level sections (Server Simulation, Networking & State Sync, Backend Infrastructure, Security And Anti-Cheat) is a clear improvement. The content is the same; it is just more navigable with the new hierarchy. No issues spotted there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant