Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github.com/mattn/go-sqlite3 requires CGo #79

Closed
cryptix opened this issue Mar 12, 2021 · 2 comments · Fixed by #387
Closed

github.com/mattn/go-sqlite3 requires CGo #79

cryptix opened this issue Mar 12, 2021 · 2 comments · Fixed by #387
Projects

Comments

@cryptix
Copy link
Member

cryptix commented Mar 12, 2021

cryptix: if the cgo based sqlite ever becomes a problem, there always is madscience: https://gitlab.com/cznic/sqlite
cryptix: o/ is a machine translated version of the C "dialect" in sqlite to pure Go. so it can be cross-compiled and used in environments where cgo is difficult or unavailable. possibly even wasm
statlz: if in wasm, would it run in the browser, but ... where would it store the data?
cryptx: not saying we need a wasm room but i disregarded sqlite before for other projects becasue cgo can be a pain
cryptix: like, if i wanted go-ssb-room on my small FreeBSD NAS, I need to compile for FreeBSD with a full C environment.. installing Go on the box isn't even enough then but also a full gcc/clang stdenv

The sqlite driver is the only CGo dependency we have, everything else can be cross-compiled.

I'm not jumping ship for the new, cgo-free version because I'm quite sure it still has some teething problems to go through but it's super impressive to see.

related links:

@cryptix cryptix added this to To do in Meta via automation Mar 23, 2021
@ahdinosaur
Copy link

ahdinosaur commented Jan 10, 2022

would folx be keen for arm64 cross-compilation? i'm keen to run butt.nz on a Raspberry Pi. 🥧

@decentral1se
Copy link
Member

Gitea are currently going for it in go-gitea/gitea#20614 so I think it might be worth a look again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Meta
To do
Development

Successfully merging a pull request may close this issue.

3 participants