cargo-bloat icon indicating copy to clipboard operation
cargo-bloat copied to clipboard

Analyze proc-macro.

Open light4 opened this issue 3 years ago • 3 comments

light4 avatar Aug 01 '22 14:08 light4

What is the use case for this? Wouldn't it conflict when crates have proc-macro dependencies? Have you tried running cargo bloat with this patch on a crate that uses proc-macros?

RazrFalcon avatar Aug 01 '22 15:08 RazrFalcon

I find the serde_derive lib is very large, which crate type is a proc-macro. I tested it on my own side project.

light4 avatar Aug 01 '22 15:08 light4

cargo bloat explicitly ignores proc-macros because it looks for binaries and can incorrectly select a proc-macro instead of user's binary. At least we had such a bug. So I'm not sure this change would work as expected. We have to somehow check that the user actually want to analyze a proc macro. No idea how to implement this thought.

RazrFalcon avatar Aug 01 '22 15:08 RazrFalcon