top | item 30131489

(no title)

bbss | 4 years ago

There are a few go libs now that offer SQLite without cgo.

https://github.com/crawshaw/sqlite https://github.com/zombiezen/go-sqlite

discuss

order

benhoyt|4 years ago

crawshaw/sqlite actually uses CGo -- it's a wrapper around the C version of SQLite. For example, see https://github.com/crawshaw/sqlite/blob/23d646f8ac00d9dd2390...

zombiezen/go-sqlite uses cznic's pure Go converted version of SQLite, so avoids CGo. It's explicitly stated to be "a fork of crawshaw.io/sqlite that uses modernc.org/sqlite, a CGo-free SQLite package. It aims to be a mostly drop-in replacement for crawshaw.io/sqlite."

bbss|4 years ago

Ah yes my bad