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

build(sqlite): Disable modernc for WASM #3048

Merged
merged 1 commit into from
Dec 8, 2023
Merged

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
8 checks passed
@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…

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.

2 participants