finds.dev← search

// the find

glebarez/go-sqlite

★ 876 · Go · BSD-3-Clause · updated Aug 2026

pure-Go SQLite driver for Go (SQLite embedded)

A pure-Go SQLite driver for database/sql, built on cznic/sqlite's from-scratch Go reimplementation of SQLite rather than cgo bindings to the real C library. It's aimed at people who want static, cross-compilable Go binaries with embedded SQLite and specifically need GORM compatibility, which is the whole reason this fork of cznic/sqlite exists.

No cgo means actual static binaries and painless cross-compilation (think Docker scratch images, ARM targets) without a C toolchain in your build pipeline. It drops in as a standard database/sql driver, so existing Go code barely changes. The connection-string _pragma syntax for things like busy_timeout and WAL mode is a nice ergonomic touch that avoids a bunch of manual PRAGMA exec calls after connecting.

This is not SQLite the C library — it's a independent Go reimplementation of the SQLite file format and SQL engine, which means you're trusting a much smaller, much less battle-tested codebase for correctness on your actual data; check the upstream cznic/sqlite issue tracker before trusting it with anything you can't lose. The README says nothing about FTS5, JSON1, or other common SQLite extensions, nor about concurrent-write behavior under SQLite's single-writer model — you'll find out the hard way. There are stray embed.db/embed2.db binary files committed to the repo root, which is a bit of a red flag for repo hygiene. Being a fork maintained for GORM compatibility also means it can lag behind upstream cznic/sqlite fixes, and the README doesn't document the sync cadence or how divergent the two have become.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →