Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 issues.


Wow! It consumes C ASTs and produces Go code? That is much more impressive than what I had suspected (and what I would have done).


JFYI a Wasm approach here

https://github.com/ncruces/go-sqlite3




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: