Skip to content

feat: switch from go compiler to tinygo #6

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

feat: switch from go compiler to tinygo #6

wants to merge 11 commits into from

Conversation

NMFR
Copy link
Owner

@NMFR NMFR commented Jan 31, 2025

Switch to tinygo to produce smaller binary (wasm) files.

@NMFR NMFR changed the title feat: swich from go compiler to tinygo feat: switch from go compiler to tinygo Jan 31, 2025
@NMFR
Copy link
Owner Author

NMFR commented Jan 31, 2025

On hold due to tinygo not being able to compile dependency with undefined: net.LookupHost:

➜ make build
rm -rf ./bin
find . -type f -name "*.proto" -exec protoc --go_out=. --go_opt=paths=source_relative "{}" \;
mkdir -p bin
GOOS=wasip1 GOARCH=wasm tinygo build -o bin/sqlc-template.wasm cmd/sqlc-template/main.go
# github.com/Masterminds/sprig/v3
../../go/pkg/mod/github.com/!masterminds/sprig/[email protected]/network.go:9:18: undefined: net.LookupHost
make: *** [Makefile:54: build] Error 1

tinygo-org/tinygo#4722

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.

1 participant