9 comments

[ 4.2 ms ] story [ 31.3 ms ] thread
(comment deleted)
Feature request: Rust proc macros and compile time statistics need to be called out on crates.io

We're starting to ban them from our Rust monorepo.

we leave poor performance stats and correction as an excercise to the user
I wonder why procmacros are slow. Can the compiler interpret them or does it have to go to all the work of compiling them before they can run?
Is this complaint only about initial checks? Or also checks after a small change?
Neat.

I use bacon with cargo-make to toggle between check, nextest+doctest, and a full series of pre-commit checks.

I'm confused about a couple things:

* What is metadata_decode_entry_impl_trait_header and what does it have to do with proc macros? I suppose if a proc macro emitted code that used impl Trait a bunch then it might need to use this code, but I don't see why that would disproportionately affect compile times.

* What's the proposal for how to fix this?