Nice! Does anybody know how I could enable this? I don't see it mentioned in the 1.41 release notes.https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1410-2020-01-30 …
-
-
Replying to @JeremyBanks @rustlang
You need want this in your Cargo.toml: [profile.release.build-override] opt-level = 0 (or any variant of this that fits your crate)
2 replies 0 retweets 3 likes -
I'm a bit confused. How does that specify overrides for only one crate?
1 reply 0 retweets 0 likes -
I'm confused by the question. It specifies the override for all build dependencies, not just one crate.
1 reply 0 retweets 0 likes -
Proc macros aren't added as build dependencies though
2 replies 0 retweets 0 likes -
The docs specifically say it also affects proc macros. See https://doc.rust-lang.org/cargo/reference/profiles.html#overrides … third code block.
1 reply 0 retweets 1 like -
Replying to @Nashenas88 @CryZe107 and
Thanks. Neither the release post nor any examples I'd seen linked to this so I was unclear
1 reply 0 retweets 0 likes -
It wasn't easy to find. I really hope this becomes more visible, or maybe even the default setting. I'd be curious (maybe scared if I had to work with it) if there was a build that would run faster with optimized build scripts and proc macros.
2 replies 0 retweets 0 likes -
Replying to @Nashenas88 @CryZe107 and
It also seems like proc-macro authors could perhaps choose to put a flag in their crates for this? Not sure what if/how profile overrides in a dependency's cargo.toml affect things. (And does this flag set by a crate affect proc macros used by its dependencies?)
1 reply 0 retweets 1 like -
I was curious about the interaction with a crate that re-exports a proc macro. Which level has to/can set it? Or is it possible at the top level only.
1 reply 0 retweets 0 likes
Diesel's an interesting case since it both re-exports and uses the proc macros defined in diesel_derives
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.