fido-device-onboard / go-fdo

A FIDO Device Onboard library with minimal dependencies
Apache License 2.0
15 stars 5 forks source link

TinyGo Support and Cloudflare Workers Example #4

Open ben-krieger opened 1 month ago

ben-krieger commented 1 month ago
$ GOOS=js GOARCH=wasm go build -ldflags '-s -w' -o go-rv.wasm ./examples/wasm/main.go && du -h go-rv.wasm
12M    go-rv.wasm
$ tinygo build -target wasm -no-debug -gc leaking -o tinygo-rv.wasm ./examples/wasm/main.go && du -h tinygo-rv.wasm
1.5M    tinygo-rv.wasm

~88% size reduction before compression

Also, updated sqlite module to not use transactions, because Cloudflare D1 does not support them.

Tracking upstream PRs that need to be merged and released first:

Other tasks: