News for hackers. Stuff that matters.
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by Groxx on Wednesday October 04, 2023 @04:12PM (#37771013)
To be a bit more specific here: pure Go binaries are trivial to cross-compile and they Just Work™ basically all the time. `GOOS="darwin" GOARCH="arm64" go build .` and you're done. Just iterate over the combinations you care about, they'll all work.

As soon as you or a library touches cgo, you have to deal with finding and setting up C cross-compilation tooling for your target(s), dynamic linking details, tons of stuff that may have nothing to do with your code or be an area you're an expert in as a Go developer.

Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by irusensei on Wednesday October 04, 2023 @05:36PM (#37772155)
Golang works on Plan9. It can even bootstrap itself. A few months ago I was trying to setup some server software on 9Front for giggles and while most stuff worked I couldn't past the Sqlite CGO dependencies.
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by ncruces on Wednesday October 04, 2023 @06:20PM (#37772595)
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 should work. I'm interested if it doesn't. Feedback appreciated.

Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by llimllib on Wednesday October 04, 2023 @09:22PM (#37773868)
Very neat! Any idea how its performance compares to the modernc port?
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by ncruces on Thursday October 05, 2023 @03:04AM (#37775646)
It's slower. But wazero is developing an optimizing compiler for amd64/arm64 (the current one is very naive) which I hope will close the gap on those platforms.