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

slimmer wasm build #41

Closed
tzemanovic opened this issue Dec 9, 2021 · 4 comments
Closed

slimmer wasm build #41

tzemanovic opened this issue Dec 9, 2021 · 4 comments

Comments

@tzemanovic
Copy link
Member

tzemanovic commented Dec 9, 2021

It looks that some dependencies (even when unused) end-up bloating the built wasm size, so we should investigate if we can remove some unnecessary dependencies from them (specifically, anything from the transitive deps from the shared crate imported via vm_env and now vp_prelude/tx_prelude crates).

┆Issue is synchronized with this Asana task by Unito

@sync-by-unito sync-by-unito bot closed this as completed Feb 3, 2022
@juped juped reopened this Feb 3, 2022
@tzemanovic tzemanovic transferred this issue from anoma/anoma Jul 7, 2022
@cwgoes
Copy link
Collaborator

cwgoes commented Jan 12, 2023

@murisi can you check this (low priority, if it's hard just close the issue) since you were looking into the WASM compilation?

@murisi
Copy link
Collaborator

murisi commented Jan 22, 2023

@cwgoes Sure! Will take a look at this...

@tzemanovic
Copy link
Member Author

one thing that has a significant impact on the size of built wasm are allocations - see e.g. https://nickb.dev/blog/avoiding-allocations-in-rust-to-shrink-wasm-modules/

@tzemanovic
Copy link
Member Author

I got some good results with disabling "std" and "clock" features in chrono which decreased most of the WASMs over 10 times, but I didn't get it fully done as there is a bunch of logic that depends on it that would need some modifications to get this to work. Most of it is in our time.rs module that we can feature guard

phy-chain pushed a commit to phy-chain/namada that referenced this issue Mar 1, 2024
feat/39 - Implement IBC interface
@cwgoes cwgoes added this to the Later / optional milestone May 24, 2024
@cwgoes cwgoes closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Todo
Development

No branches or pull requests

4 participants