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

Slim down the WebAssembly build binary size #5403

Open
vanillajonathan opened this issue Sep 17, 2024 · 3 comments
Open

Slim down the WebAssembly build binary size #5403

vanillajonathan opened this issue Sep 17, 2024 · 3 comments

Comments

@vanillajonathan
Copy link

Summary

The .wasm file is 22,80 MB which is quite hefty. I don't really need all the modules or even all the language features. Is there any way to slim it down?

@miviwi
Copy link

miviwi commented Sep 17, 2024

Disabling the compiler feature (and freezing the standard lib) is the best you can do... that is unless you need the compiler at runtime in which case - not much you can do really
Doing that I've managed to slim down the binary to ~12MB from what I recall

(I went over this with @youknowone on discord some time ago; had the same "problem" I guess you could say. "no slim config ATM" - apart from the above - was the conlusion)

@miviwi
Copy link

miviwi commented Sep 17, 2024

Oh and I should mention... there's nothing stopping you from freezing only some modules from the stdlib - if that didn't come out in the previous comment - the whole thing is very heavy

@vanillajonathan
Copy link
Author

Perhaps there ought to be some information about this in the wiki.

@youknowone youknowone changed the title Slim down the WebAssembly Slim down the WebAssembly build binary size Oct 2, 2024
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

2 participants