Skip to content

How to set wasm-opt level to -O4 ? #949

Answered by airblast-dev
michalsustr asked this question in Q&A
Discussion options

You must be logged in to vote

You can set the wasm-opt level in the rust asset element. This is done by setting the data-wasm-opt to "4".
You can check out the docs for other accepted values: https://trunkrs.dev/assets/#rust

Here is the modified rust asset from the yew example that sets the wasm-opt level to 4.

<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="4" data-bin="yew-example" data-cargo-features="demo-abc,demo-xyz"/>

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@michalsustr
Comment options

@airblast-dev
Comment options

@michalsustr
Comment options

@airblast-dev
Comment options

Answer selected by michalsustr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants