Skip to content

Commit

Permalink
docs(EXC): Add ic-wasm version to backtrace docs (#5444)
Browse files Browse the repository at this point in the history
In the backtrace page, document which version of `ic-wasm` has full
support for the `--keep-name-section` flag.
  • Loading branch information
adambratschikaye authored Feb 24, 2025
1 parent 6fade58 commit 8b39502
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _wasm_backtrace_canister::outer
## Checking for canister support

Backtrace support relies on function names being stored in the `name` [custom section](https://webassembly.github.io/spec/core/appendix/custom.html#name-section) of the canister Wasm module.
Any canister built with dfx version `>= 0.24.2` should automatically have support for backtraces. If you're manually altering your canister Wasm code with the `ic-wasm shrink` or `ic-wasm metadata` commands, you'll need to add the `--keep-name-section` flag to ensure the canister can still provide backtraces.
Any canister built with `dfx` version `>= 0.24.2` should automatically have support for backtraces. If you're manually altering your canister Wasm code with the `ic-wasm shrink`, `ic-wasm optimize`, or `ic-wasm metadata` commands, you'll need to add the `--keep-name-section` flag to ensure the canister can still provide backtraces. This requires version `ic-wasm` version `>= 0.8.6`.

To double check that a Wasm module has the name section, you can use [`wasm-objdump`](https://github.com/WebAssembly/wabt):

Expand Down

0 comments on commit 8b39502

Please sign in to comment.