Replies: 4 comments
-
Why don't you check for yourself with https://crates.io/crates/cargo-bloat ? |
Beta Was this translation helpful? Give feedback.
-
Maybe you can try to dynamic link. |
Beta Was this translation helpful? Give feedback.
-
Considering Rust does not have a stable ABI, dynamic linking isn't useful except (a) for faster local rebuilds and (b) deploying multiple applications alongside a shared library. For now, the only thing to do really is to strip executables and put up with the size, or go use another library (some are better than others). Using a different backend (glow vs wgpu) may make a difference; reducing the number of compile features used may also help a little. |
Beta Was this translation helpful? Give feedback.
-
Another option is to compress the executable using something like https://github.com/upx/upx. |
Beta Was this translation helpful? Give feedback.
-
After cargo build --release on Windows with only the counter example, the size of counter.exe is 8.4MB,why it is so big?What does it contains?
Beta Was this translation helpful? Give feedback.
All reactions