Skip to content

Additional useful TinyGo build flag #165

@olliephillips

Description

@olliephillips

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%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions