Skip to content

fix: Let configured file storage reach SQLite on WASI - #6

Merged
krodak merged 1 commit into
mainfrom
feat/wasi-file-storage
Sep 4, 2026
Merged

fix: Let configured file storage reach SQLite on WASI#6
krodak merged 1 commit into
mainfrom
feat/wasi-file-storage

Conversation

@krodak

@krodak krodak commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Overview

SQLiteConnectionSource currently replaces every configured WASI storage value with .memory, so .file(path:) never reaches SQLite. sqlite-nio now supports file-backed databases through the stock WASI filesystem, so this removes the obsolete workaround and passes the configured file path through.

Existing .memory behavior on WASI stays unchanged. Non-WASI code is unchanged.

Links

What changed

  • SQLiteConnectionSource.swift - preserve .memory storage on WASI and pass .file(path:) directly to SQLiteConnection.Storage.file.

Tested

  • ~/.swiftly/bin/swiftly run swift test +6.3.3
  • ~/.swiftly/bin/swiftly run swift build +6.3.3 --swift-sdk swift-6.3.3-RELEASE_wasm
  • Fresh-process QuantumStorageCore persistence harness: write in one wasmtime process, read from the same file in a second process

@krodak krodak self-assigned this Sep 4, 2026
@krodak
krodak requested a review from scottmarchant September 4, 2026 12:33

@scottmarchant scottmarchant left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, thanks!

@krodak
krodak merged commit bf1ea23 into main Sep 4, 2026
16 checks passed
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.

2 participants