21 points · by todsacerdoti · 1y ago · 11 comments
This is excellent that you're creating this crate and sharing it. I know your company Pipedream and admire what you're doing there too.
We're progressively banning macro usage from our Rust monorepo. Macro-heavy dependencies are also going to be pruned eventually.
As much as I love Serde, it makes compile times for projects like async-stripe absolutely productivity killing. It interferes heavily with work.
Crates.io would be fantastic if it had compile time metrics and macro metrics reported for projects and dependencies.
[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`.