Closed trinity-1686a closed 7 months ago
Thanks! I suppose you're asking for something similar to https://github.com/bnjbvr/cargo-machete/issues/100? It's not specific to --with-metadata
, we don't handle build.rs / build-dependencies at all, as of now. So I'll close as a duplicate. (Please reopen or let me know if you were asking for something different.)
I think it's the opposite in a way, without --with-metadata
it doesn't optimize, and with --with-metadata
it optimizes "too much", suggesting to remove used dependencies. For instance in https://github.com/quickwit-oss/quickwit/ , --with-metadata
suggest removing quickwit_codegen
from ./quickwit-ingest/Cargo.toml
, where it appears only as a [build-dependencies], and is used in the build.rs.
If it's not supported for now, this issue only half-make-sense anyway.
thanks for making that tool. I'm currently trying to trim unused dependencies, and it has been a great help
running
cargo machete --with-metadata
on a project with build dependencies doesn't seem to consider anything used insidebuild.rs