ncruces/go-sqlite3
View on GitHub ↗ ★ 1,132 Go
Go bindings to SQLite using wasm2go
84 mentions on Hacker News by 11 people: 6 stories, 78 comments · first 2023-04-08 · latest 2026-10-21
20082026
-
…one instance that doesn't know about checksums to modify a checksummed DB for it to appear corrupt. https://github.com/ncruces/go-sqlite3/tree/main/vfs#checksum... Weirdly, databases created with the macOS version of the sqlite3 CLI…
comment by ncruces · 2024-11-09 · in SQLite does not do checksums -
I'm the developer of the Wasm driver mentioned in the article: https://github.com/ncruces/go-sqlite3 The v0.20.x series (I just released v0.20.1) should improve this significantly . The driver was reserving lots of address space (with a…
comment by ncruces · 2024-11-06 · in GoToSocial WASM-based SQLite driver and BSD -
It gets even more amazing than that. Look at this bit from my GitHub Actions: https://github.com/ncruces/go-sqlite3/blob/fefee692dbfad39f6... I install QEMU (I have the same setup locally), then it's one line each to run unit tests for:…
comment by ncruces · 2024-10-19 · in Show HN: Go Plan9 Memo -
…this, I'm sure that people who've been trying for the past year² will definitely appreciate it. 1: https://github.com/ncruces/go-sqlite3/discussions/69 2: https://github.com/rhashimoto/wa-sqlite
comment by ncruces · 2024-10-16 · in Sqlite3 WebAssembly -
…issue. I had to build a VFS from scratch to get my Wasm based SQLite driver into a usable shape. https://github.com/ncruces/go-sqlite3/blob/main/vfs/README.m...
comment by ncruces · 2024-10-15 · in Sqlite3 WebAssembly -
For use in Golang, I really like ncruces wasm SQLite package - https://github.com/ncruces/go-sqlite3 . Unlike cznic's go package (which is great, btw), the wasm version works well on OpenBSD and the like.
comment by koeng · 2024-10-15 · in Sqlite3 WebAssembly -
…If you want to experiment with BEGIN CONCURRENT in Go you could do worse than try my SQLite driver: https://github.com/ncruces/go-sqlite3 Import this package to get the version with BEGIN CONCURRENT: https://github.com/ncruces/go-sqlite3/tr…
comment by ncruces · 2024-09-29 · in Some Go web dev notes -
Has been done and works pretty great: https://github.com/ncruces/go-sqlite3 . Though doesn’t convert the WASM to C, it runs the WASM in Wazero instead.
comment by daenney · 2024-07-31 · in Building static binaries with Go on Linux -
…has been better than the modernc transpile and it’s probably sufficient for a lot of use cases. [1] https://github.com/ncruces/go-sqlite3
comment by daenney · 2024-07-31 · in Building static binaries with Go on Linux -
…it tweakable at build, which was always the intent, although I expect the default to be popular. https://github.com/ncruces/go-sqlite3/blob/67d859a5/vfs/adia... That's unfortunate about the default parameters, but note that you can also…
comment by ncruces · 2024-05-02 · in Show HN: Roast my SQLite encryption at-rest -
…I'd be very interested. So, thus far, I also don't have anything that drives towards libSQL. [1] https://github.com/ncruces/go-sqlite3
comment by ncruces · 2024-04-30 · in Show HN: Roast my SQLite encryption at-rest -
▲ 99
Show HN: Roast my SQLite encryption at-reststory by ncruces · 2024-04-30 · 50 comments
-
…that has both a low-level and a database/sql driver and which builds and runs everywhere Go does: https://github.com/ncruces/go-sqlite3
comment by ncruces · 2024-02-07 · in Jsonfile: A Quick Hack for Tinkering -
…implement safe locking. Depending on your familiarity with Go, mine maybe easier to follow, or not. https://github.com/ncruces/go-sqlite3/blob/f1b00a9944730eaa9...
comment by ncruces · 2023-12-28 · in Show HN: sqlite-memory-vfs - Open a SQLite db in Python without hitting disk -
…after the DB goes “live.” [1] https://www3.sqlite.org/src/file?name=src/memdb.c [2] https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/memdb#s...
comment by ncruces · 2023-12-28 · in Show HN: sqlite-memory-vfs - Open a SQLite db in Python without hitting disk -
…support both high and low level APIs. [1]: https://crawshaw.io/blog/go-and-sqlite [2]: https://pkg.go.dev/github.com/ncruces/go-sqlite3/driver#exam...
comment by ncruces · 2023-12-15 · in Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it -
…not import package embed, which embeds my WASM and sets this variable for you at init): https://pkg.go.dev/github.com/ncruces/go-sqlite3#pkg-variabl... Ping me on GitHub if you need help. Vector search is on my meters long todo list, but…
comment by ncruces · 2023-12-15 · in Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it -
…is to make sure building "the WASM BLOB" is easily reproducible with widely available tools: https://github.com/ncruces/go-sqlite3/blob/main/.github/work... I do apply some light patches to SQLite, but so far they've always cleanly…
comment by ncruces · 2023-12-15 · in Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it -
…in memory. You can then save the modified copy to disk using the backup API: [1]: https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/memdb#e... [2]: https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b...
comment by ncruces · 2023-12-15 · in Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it -
The nitty gritty is in another answer. The commits implementing the new function cache are these two: https://github.com/ncruces/go-sqlite3/compare/0b093b7c...986... Creating good, representative, benchmarks is hard. I use speedtest1 [1]…
comment by ncruces · 2023-12-15 · in Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it -
▲ 234
Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed itstory by ncruces · 2023-12-15 · 58 comments
-
…do. I could use ints rather than strings for function identifiers. I'll evaluate that later. [1]: https://github.com/ncruces/go-sqlite3/commit/964a42c76deb9c7...
comment by ncruces · 2023-12-14 · in I benchmarked six Go SQLite drivers -
…I expect to cut numbers for CPU bound tests in half due to this mishap. So, thanks cvilsmeier! [1]: https://github.com/ncruces/go-sqlite3/commit/a9e32fd3f0b9f39... [2]: https://github.com/ncruces/go-sqlite3/commit/d862f47d95d522f... [3]:…
comment by ncruces · 2023-12-14 · in I benchmarked six Go SQLite drivers -
…of SQLite built with much the same toolchain, which, hopefully, smokes out compiler bugs. [1]: https://github.com/ncruces/go-sqlite3/blob/main/.github/work...
comment by ncruces · 2023-12-13 · in I benchmarked six Go SQLite drivers -
I'm the author or the WASM (+wazero) based github.com/ncruces/go-sqlite3. Happy to field questions. W.r.t. benchmark results. wazero's current compiler is somewhat naive, which may explain a large performance delta in CPU bound tests. A…
comment by ncruces · 2023-12-13 · in I benchmarked six Go SQLite drivers -
You have options that don't use cgo. Disclaimer, I made the second one. https://modernc.org/sqlite https://github.com/ncruces/go-sqlite3
comment by ncruces · 2023-12-07 · in JSONB has landed -
▲ 9
Show HN: Go bindings to SQLite using wazerostory by ncruces · 2023-11-24 · 3 comments
-
Disclosure: I'm working on alternative Cgo-less bindings for SQLite, using wazero. https://github.com/ncruces/go-sqlite3 One of the problems of the modernc approach (IMO) is that they're not just transpiling CPU/compute stuff, but entirely…
comment by ncruces · 2023-11-05 · in Show HN: Gogosseract, a Go Lib for CGo-Free Tesseract OCR via Wazero -
Can you say more, like name your project? I'm building https://github.com/ncruces/go-sqlite3 and am a community maintainer of https://wazero.io I can cross compile SQLite into all platforms that Go OOB compiles too, with the caveat that…
comment by ncruces · 2023-10-06 · in Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go -
…replacing the OS layer (VFS) with portable Go code count? That's the elevator pitch (so far) for: https://github.com/ncruces/go-sqlite3/tree/main
comment by ncruces · 2023-10-04 · in Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go -
If you still have that itch to scratch, you can try: https://github.com/ncruces/go-sqlite3 You'll need to use the sqlite3_nolock build tag; concurrent writes will quickly corrupt your database. SetMaxOpenConns(1) is your friend. But it…
comment by ncruces · 2023-10-04 · in Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go -
…wazero instead) and want to avoid cgo, you may be interested in my wazero based SQLite bindings: https://github.com/ncruces/go-sqlite3
comment by ncruces · 2023-07-02 · in Wazero: Zero dependency WebAssembly runtime written in Go -
…contained at the end. A couple examples of this: * https://github.com/jerbob92/go-pdfium-wasm * https://github.com/ncruces/go-sqlite3 More here: https://wazero.io/community/users/ Note that often times a lot of work is porting because not…
comment by adrianfcole · 2023-05-07 · in FaaS in Go with WASM, WASI and Rust -
JFYI a Wasm approach here https://github.com/ncruces/go-sqlite3
comment by anuraaga · 2023-04-08 · in Go port of SQLite without CGo