Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

I've been experimenting with compiling the sqlc CLI to WASI. To get this to work, the modernc.org/sqlite package needs to be excluded from the build, as it doesn't support the WASI target.

CGO_ENABLED=0 GOOS=wasip1 GOARCH=wasm go build -o sqlc.wasm ./cmd/sqlc

@kyleconroy kyleconroy merged commit 7f3273d into main Dec 8, 2023
@kyleconroy kyleconroy deleted the kyle/sqlite-wasm branch December 8, 2023 17:45
@ncruces
Copy link

ncruces commented Dec 11, 2023

Just FYI, #3045 would take care of this 1 (with a caveat: WASI doesn't support file locking, so concurrent access is problematic).

Footnotes

  1. as well as other exotic targets, like DragonFlyBSD, illumos, Solaris…

alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants