question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimize release binary (anti-bloat)

See original GitHub issue

Optimize 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:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
FabianLarscommented, Feb 19, 2022

What Lucas meant is that our cli executes the OS’ strip command

1reaction
chipperscommented, Jun 28, 2021

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 now

edit: also that command needs to specify the target triple to work (like --target x86_64-unknown-linux-gnu) and the result will be in target/x86_64-unknown-linux-gnu/release

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found