3 ms·
What approach is used here? WebAssembly (or something similar)? I see a bunch of huge Go files with architecture names.
by schemescape 4y ago
What approach is used here? WebAssembly (or something similar)?
I see a bunch of huge Go files with architecture names.
- eatonphil 4y agoIt'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 https://gitlab.com/cznic/ccgo Edit: Look around the source for "ccgo". Like https://gitlab.com/cznic/sqlite/-/blob/master/doc.go#L202 https://gitlab.com/cznic/sqlite/-/blob/master/doc.go#L202 and look for "ccgo" in the closed issues.
- schemescape 4y agoWow! It consumes C ASTs and produces Go code? That is much more impressive than what I had suspected (and what I would have done).
- anuraaga 4y agoJFYI a Wasm approach here https://github.com/ncruces/go-sqlite3 https://github.com/ncruces/go-sqlite3