Skip to content

Commit e0c92e4

Browse files
author
Alex Casalboni
committed
docs: add -no-debug warning for tinygo
1 parent 44ba26e commit e0c92e4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • component-model/src/language-support

component-model/src/language-support/go.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ Under the hood, TinyGo invokes `wasm-tools` to embed the WIT file to the module
286286
tinygo build -target=wasip2 -o add.wasm --wit-package docs:adder@0.1.0.wasm --wit-world adder main.go
287287
```
288288

289+
> **WARNING:** By default, tinygo includes all debug-related information in your .wasm file. That is desirable when prototyping or testing locally to obtain useful backtraces in case of errors (for example, with `wasmtime::WasmBacktraceDetails::Enable`). To remove debug data and optimize your binary file, build with `-no-debug`. The resulting .wasm file will be considerably smaller (up to 75% reduction in size).
290+
289291
We now have an add component that satisfies our `adder` world, exporting the `add` function, which
290292

291293
We can confirm using the `wasm-tools component wit` command:

0 commit comments

Comments
 (0)