What approach is used here? WebAssembly (or something similar)? I see a bunch of huge Go files with architecture names.
It's hard to find actual info on this other than Reddit comments but the author wrote a C to Go compiler and then ran it on the SQLite C code base to get a SQLite Go code base. Which means you don't need CGo to embed SQLite if you use that version. https://gitlab.com/cznic/ccgo Edit: Look around the source for "ccgo". Like https://gitlab.com/cznic/sqlite/-/blob/master/doc.go#L202 and look for "ccgo" in the closed iss…
Go port of SQLite without CGo
11–20 of 122 posts
Re: Go port of SQLite without CGo
#12Always seemed silly that one of the most popular storage technologies couldn't be accessed with pure Go.
Re: Go port of SQLite without CGo
#13Re: Go port of SQLite without CGo
#14I've use this. Slightly slower, but for my use case that was fine (a small blog) and immeasurably better doing away with all the CGO hassle. Especially when I might cross compile to an Arm architecture, or some docker container that uses a different approach to the c libraries (like Alpine vs Ubuntu Server or whatever) it was always a hassle, and thats all gone away now. Always seemed silly that one of the most popul…
I don't know why Google didn't pay someone to do this or do it themselves. Surely they use Go and sqlite together.
Re: Go port of SQLite without CGo
#15I've use this. Slightly slower, but for my use case that was fine (a small blog) and immeasurably better doing away with all the CGO hassle. Especially when I might cross compile to an Arm architecture, or some docker container that uses a different approach to the c libraries (like Alpine vs Ubuntu Server or whatever) it was always a hassle, and thats all gone away now. Always seemed silly that one of the most popul…
Re: Go port of SQLite without CGo
#16Re: Go port of SQLite without CGo
#17I've use this. Slightly slower, but for my use case that was fine (a small blog) and immeasurably better doing away with all the CGO hassle. Especially when I might cross compile to an Arm architecture, or some docker container that uses a different approach to the c libraries (like Alpine vs Ubuntu Server or whatever) it was always a hassle, and thats all gone away now. Always seemed silly that one of the most popul…
>Always seemed silly that one of the most popular storage technologies couldn't be accessed with pure Go. I don't know why Google didn't pay someone to do this or do it themselves. Surely they use Go and sqlite together.
Re: Go port of SQLite without CGo
#18If you cross-compile (which everybody using macOS to developer for Linux servers does), it's annoying to introduce SQLite to your project, because immediately the conventional `GOOS= GOARCH= go build` trick stops working. But, in case it's helpful, it's also really easy to set up a full cross-compiling environment, either with Zig or with Filippo's musl-cross: https://words.filippo.io/easy-windows-and-linux-cross-com…
Re: Go port of SQLite without CGo
#19I've use this. Slightly slower, but for my use case that was fine (a small blog) and immeasurably better doing away with all the CGO hassle. Especially when I might cross compile to an Arm architecture, or some docker container that uses a different approach to the c libraries (like Alpine vs Ubuntu Server or whatever) it was always a hassle, and thats all gone away now. Always seemed silly that one of the most popul…
Pretty much any database is NOT written in Go, so what's the difference?
Re: Go port of SQLite without CGo
#20Earlier quoted context omitted.
>Always seemed silly that one of the most popular storage technologies couldn't be accessed with pure Go. I don't know why Google didn't pay someone to do this or do it themselves. Surely they use Go and sqlite together.
You’re overestimating the influence Google as a cooperation has on Go, you think they’re gonna pay for what they’re not gonna use ?
This is it. They have internal datastores that they use for nearly everything. They might be using SQLite somewhere for something, but I really doubt this would even land near the bottom of their priority list.