mirror of
1
Fork 0
gotosocial/vendor/github.com/ncruces/go-sqlite3
kim 1e7b32490d
[experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863)
This allows for building GoToSocial with [SQLite transpiled to WASM](https://github.com/ncruces/go-sqlite3) and accessed through [Wazero](https://wazero.io/).
2024-05-27 17:46:15 +02:00
..
driver [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
embed [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
internal/util [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
util/osutil [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
vfs [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
.gitignore [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
LICENSE [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
README.md [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
backup.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
blob.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
config.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
conn.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
const.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
context.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
error.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
func.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
go.work [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
go.work.sum [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
json.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
pointer.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
quote.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
sqlite.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
stmt.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
time.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
txn.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
value.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00
vtab.go [experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863) 2024-05-27 17:46:15 +02:00

README.md

Go bindings to SQLite using Wazero

Go Reference Go Report Go Coverage

Go module github.com/ncruces/go-sqlite3 is a cgo-free SQLite wrapper.
It provides a database/sql compatible driver, as well as direct access to most of the C SQLite API.

It wraps a Wasm build of SQLite, and uses wazero as the runtime.
Go, wazero and x/sys are the only runtime dependencies 1.

Packages

Extensions

Advanced features

Caveats

This module replaces the SQLite OS Interface (aka VFS) with a pure Go implementation, which has advantages and disadvantages.

Read more about the Go VFS design here.

Testing

This project aims for high test coverage. It also benefits greatly from SQLite's and wazero's thorough testing.

Every commit is tested on Linux (amd64/arm64/386/riscv64/s390x), macOS (amd64/arm64), Windows (amd64), FreeBSD (amd64), illumos (amd64), and Solaris (amd64).

The Go VFS is tested by running SQLite's mptest.

Performance

Perfomance of the database/sql driver is competitive with alternatives.

The Wasm and VFS layers are also tested by running SQLite's speedtest1.

Alternatives


  1. anything else you find in go.mod is either a test dependency, or needed by one of the extensions. ↩︎