built
built copied to clipboard
Filter dependencies by feature, target, and kind
Currently, it appears that built determines the value of DEPENDENCIES by just parsing Cargo.lock and extracting the name & version of every entry. This strikes me as suboptimal, as presumably one would want the list of dependencies stored in a binary to match the actual dependencies used to build it, i.e., excluding dev dependencies, dependencies for other targets, and dependencies for inactive features.
As built currently doesn't do such filtering, I implemented it myself in my own build.rs by using cargo-metadata and traversing the "resolve" nodes; feel free to make use of this MIT-licensed code if you need it.
folding into #49
@lukaslueg Could this be re-opened? What I'm asking for is distinctly different from just separating direct dependencies from indirect, and this issue is not resolved by the commit that resolved #49.