-
Notifications
You must be signed in to change notification settings - Fork 75
Reduce wasm code size #211
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
Comments
At the moment, It is possible that |
Cargo custom profiles are soon to be stable. |
cc #1729 |
This can be reduced further (at the moment, from 5.0 Mib to 4.5 MiB) by using |
cc #1801 |
I don't see how to further improve the size of the Wasm, except by removing all panic messages, which would be very hard to do and is questionable. Additionally, we don't have any target for the size of the Wasm, except "as little as possible". Therefore closing this issue. |
A few things that can be done:
opt-level = "s"
in our Cargo.toml profile. This shrinks the size by around 10%. Unfortunately the full-node would then also useopt-level = "s"
. Cargo custom profiles would help.-Zbuild-std -Zbuild-std-features=panic_immediate_abort
requires a nightly Rust compiler and the Wasi SDK installed, which is annoying.-C link-arg=-z -C link-arg=stack-size=65536
didn't result in a significant difference for me.The text was updated successfully, but these errors were encountered: