Skip to content

feat: native SQLite KV channel#4453

Open
NathanFlurry wants to merge 107 commits intomainfrom
ralph/native-sqlite-kv-channel
Open

feat: native SQLite KV channel#4453
NathanFlurry wants to merge 107 commits intomainfrom
ralph/native-sqlite-kv-channel

Conversation

@NathanFlurry
Copy link
Member

Summary

  • Implement native SQLite addon (@rivetkit/sqlite-native) using napi-rs with a custom VFS backed by KV over WebSocket
  • Add KV channel protocol (BARE schema + TypeScript/Rust implementations) for direct SQLite-to-engine KV communication
  • Add engine KV channel WebSocket server (pegboard-kv-channel crate) with single-writer lock enforcement
  • Integrate KV channel into manager router, guard routing, and file-system/cloudflare-workers drivers
  • Align WASM VFS with native VFS: add deleteRange, PRAGMA settings, matching chunk layout and key encoding
  • Add per-actor channel routing, unconditional lock eviction on reconnect, and spawn_blocking for napi exports
  • Add Rust VFS unit tests, integration tests, and review findings documentation

Test plan

  • Run pnpm test driver-file-system-native-sqlite from rivetkit-typescript/packages/rivetkit
  • Run pnpm test driver-file-system to verify WASM VFS still passes
  • Run cargo test -p rivetkit-sqlite-native for Rust unit/integration tests
  • Run cargo check on the full workspace
  • Verify KV channel WebSocket endpoint responds on manager router

🤖 Generated with Claude Code

NathanFlurry and others added 29 commits March 21, 2026 17:42
…e KV channel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…te on failure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… JsKvChannel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rmation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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