-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some comments re Rhai packages #2
Comments
Not sure if these in lto = "fat"
codegen-units = 1 |
Fat LTO does cut down about 12KB in raw size, but it is currently a bit broken on Rust stable. |
Well, how about |
Same thing. |
I've been using LTO for quite a while now (well, actually months), and it has been stable so far... Really needed this for dead-code removal... without it the binaries tend to be huge. |
No, it's an issue specific to Wasm: rust-lang/rust#72758 |
https://github.com/alvinhochun/wasm-project-template/blob/rhai-demo/wasm-module/src/scripting.rs#L10-11
You don't need these lines:
Engine::new()
already includes these packages. You don't have to load them once again and it'll be better on speed.If you want to only include these packages and nothing else, you should use
Engine::new_raw()
. This way, the WASM size will be significantly reduced because code from non-loaded packages will not be included.The text was updated successfully, but these errors were encountered: