Skip to content

Support matrix

Nuno Cruces edited this page Jan 7, 2025 · 1 revision

Tested configurations

The following configurations are tested in CI.

GOOS GOARCH Tags Compiler File locks Shm WAL
linux amd64 🟒 🟒 🟒
linux arm64 🟒 🟒 🟒
linux riscv64 πŸ”΄ 🟒 🟒
linux ppc64le πŸ”΄ 🟒 🟒
linux 386 πŸ”΄ 🟒 🟒
darwin arm64 🟒 🟒 🟒
darwin amd64 🟒 🟒 🟒
windows amd64 🟒 🟒 🟒
freebsd amd64 🟒 🟑 🟒
freebsd arm64 🟒 🟑 🟒
netbsd amd64 🟒 🟑 🟒
netbsd arm64 🟒 🟑 🟒
openbsd amd64 πŸ”΄ 🟑 🟒
dragonfly amd64 🟒 🟑 🟒
illumos amd64 🟒 🟑 🟒
darwin arm64 sqlite3_flock 🟒 🟑 🟒
darwin arm64 sqlite3_dotlk 🟒 🟠 🟠
linux amd64 sqlite3_flock 🟒 🟠 🟒
linux amd64 sqlite3_dotlk 🟒 🟠 🟠
linux s390x sqlite3_dotlk πŸ”΄ 🟠 🟠
wasip1 wasm sqlite3_dotlk πŸ”΄ 🟠 🟠
solaris amd64 sqlite3_dotlk 🟒 🟠 🟠

Other configurations

The following configurations are not tested but are expected to work.

GOOS GOARCH Tags Compiler File locks Shm WAL
windows arm64 🟒 🟒 🟒
windows 386 πŸ”΄ 🟒 🟒
linux other πŸ”΄ 🟒 πŸ”΄
other any πŸ”΄ πŸ”΄ πŸ”΄
other any sqlite3_dotlk πŸ”΄ 🟠 🟠

GOOS and GOARCH

You need a working Go toolchain.

Build tags

These customize the Go SQLite VFS.

Compiler

We automatically use wazero's:

  • 🟒 compiler: on an SSE4.1 or ARMv8 processor, on supported OSes
  • πŸ”΄ interpreter

The interpreter is significantly slower (but the compiler introduces startup latency).
Use wazero.NewRuntimeConfigInterpreter() to always use the interpreter.

File locking

Use vfs.SupportsFileLocking to check if your build supports file locking:

  • 🟒 full support
  • 🟑 reduced concurrency: BEGIN IMMEDIATE behaves like BEGIN EXCLUSIVE (docs)
  • 🟠 incompatible locking: accessing databases concurrently with other SQLite libraries risks data corruption
  • πŸ”΄ no support: can only open databases with nolock=1 (or immutable=1); WAL mode not supported

Shared memory WAL

Use vfs.SupportsSharedMemory to check if your build supports shared memory:

  • 🟒 full support
  • 🟠 in-process: WAL databases can only be accessed by a single proccess; other processes may fail with SQLITE_PROTOCOL, SQLITE_IOERR, or SQLITE_CANTOPEN
  • πŸ”΄ no support: can only open WAL databases with EXCLUSIVE locking mode