I have tried setting the build dependencies optimization level to higher-than-default in the past, but it seems to achieve nothing.
[profile.dev.build-override]
opt-level = 3
codegen-units = 1
[profile.dev.package."syn"]
opt-level = 3
codegen-units = 1
[profile.dev.package."synstructure"]
opt-level = 3
codegen-units = 1
[profile.dev.package."quote"]
opt-level = 3
codegen-units = 1
# CTRL+C when it reaches async-stripe, then repeat
> rm -r target/debug/build/async-stripe*; time cargo build
default, O1, O2, O3: Executed in 47.13 secs
Executed in 45.68 secs
Executed in 46.07 secs
Executed in 46.22 secs
sccache will provide a major benefit, especially in combination with `cargo-hakari`.