Reputation:
I have a build.rs
that generates tables. They are expensive to calculate and I would like to run build.rs
in release mode. However, it seems it always runs in debug mode regardless of build profile selected.
This issue discusses this specifically, and is closed, but I'm unable to extract the tidbit that allows me to run build.rs
in release mode regardless of the build profile I'm using. How do I do this?
Upvotes: 1
Views: 592
Reputation: 71380
You can set build-override
's opt-level
to 3
. Beware that this will also optimize proc macros and build dependencies.
Upvotes: 1