Open
Description
Many C++ compilers allow disabling the optimizer for a span of code with a #pragma. I can think of a few use-cases, but there may be others:
- I would like to have optimizations on for all upstream crates, but off for my own code to improve build times and debugging experience. (In a big project, I might want to turn optimizations off for just some of my codebase.)
- If I had a large codebase, I might need the optimizer to reduce the binary size to fit on a target device.
If this functionality does not exist (or is not yet stable), and others here agree that it's worth pursuing, it might be worth raising this with the core rust team so that they know it's of interest to us.
If it does exist, then it may be worth trying to share more broadly that this is possible.
- This could be in the form of general guidance (i.e. reddit or blog post)
- We could recommend to those authoring crates that they mention this in their readme. It's best if people new to the ecosystem have a good initial experience, and they may not be aware of how much faster optimized Rust is than unoptimized.
Metadata
Metadata
Assignees
Labels
No labels