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

Additional useful TinyGo build flag #165

Open
olliephillips opened this issue Mar 31, 2023 · 0 comments
Open

Additional useful TinyGo build flag #165

olliephillips opened this issue Mar 31, 2023 · 0 comments

Comments

@olliephillips
Copy link

Thanks for this resource, it got me started. Just a heads up. I have noted that one TinyGo flag that makes a huge difference to built WASM executable size is -no-debug. This would seem to be safe. TinyGo docs state:

-no-debug Disable outputting debug symbols. This can be useful for WebAssembly, as there is no debugger for .wasm files yet and .wasm files are generally served directly. Avoiding debug symbols can have a big impact on the generated binary size, reducing them by more than half.

In my own testing, it has reduced size by over 150%.

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

No branches or pull requests

1 participant