Optimize release binary (anti-bloat)
See original GitHub issueOptimize release binary with @chippers suggestions
One of them is:
cargo +nightly build --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort
https://tauri.studio/en/docs/usage/guides/bundler/anti-bloat/
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Optimizing the size of your Rust binaries - Sylvain Kerkour
By default, Rust produces fairly large binaries, which may be annoying when building a RAT. A larger executable means more resources used on ......
Read more >Optimizing for Size - The `wasm-bindgen` Guide
First and foremost, wasm-bindgen is designed to be lightweight and a "pay only for what you use" mentality. If you suspect that wasm-bindgen...
Read more >Why is my binary smaller when using -fno-aggressive-loop ...
Now my question is how can an active optimization make a binary larger or switching off this optimization make it smaller?
Read more >johnthagen/min-sized-rust: How to minimize Rust binary size
This repository demonstrates how to minimize the size of a Rust binary. By default, Rust optimizes for execution speed, compilation speed, and ease...
Read more >15 Ways to Beat Belly Bloat in 2 Days | Men's Journal
Have a beach trip or photo-worthy event coming up? Follow these tips to beat belly bloat and flatten your stomach ahead of time....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What Lucas meant is that our cli executes the OS’ strip command
cargo is supposed to have a nightly feature
-Z strip=symbols
which strips during the linking phase, but on the last nightly version I didn’t get it to work. It might work nowedit: also that command needs to specify the target triple to work (like
--target x86_64-unknown-linux-gnu
) and the result will be intarget/x86_64-unknown-linux-gnu/release