Skip to content
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

Reduce wasm code size #211

Closed
tomaka opened this issue Nov 18, 2020 · 6 comments
Closed

Reduce wasm code size #211

tomaka opened this issue Nov 18, 2020 · 6 comments

Comments

@tomaka
Copy link
Contributor

tomaka commented Nov 18, 2020

A few things that can be done:

@tomaka
Copy link
Contributor Author

tomaka commented Nov 18, 2020

At the moment, data[13] occupies around 1MiB. It contains panic messages.

It is possible that -Zbuild-std-features=panic_immediate_abort removes it entirely. If not, we should find a way to do so.

@tomaka
Copy link
Contributor Author

tomaka commented Nov 8, 2021

Cargo custom profiles are soon to be stable.

@tomaka
Copy link
Contributor Author

tomaka commented Dec 2, 2021

cc #1729

@tomaka
Copy link
Contributor Author

tomaka commented Dec 2, 2021

This can be reduced further (at the moment, from 5.0 Mib to 4.5 MiB) by using wasm-snip --snip-rust-panicking-code. However, doing so means that we will not see the panic message nor stack frames, which is probably undesirable.

@tomaka
Copy link
Contributor Author

tomaka commented Dec 17, 2021

cc #1801

@tomaka
Copy link
Contributor Author

tomaka commented Jul 25, 2022

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.

@tomaka tomaka closed this as completed Jul 25, 2022
stiiifff pushed a commit to stiiifff/smoldot-old that referenced this issue Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant