Description
When I read the documentation for build scripts, my impression was that metadata passing via DEP_*
environment variable was supported for all crate dependencies. I was confused why part of the description of this mechanism was in the "links" section, but based on the wording, I figured native libraries were only an example use case for what seemed to be a general purpose mechanism for one build script to pass information to another.
In fact, DEP_*
environment variables will only be passed for dependencies that declare some value for links
, and in fact that value is what gets put between DEP_ and the custom key (I would expect it to be the crate name). Maybe I'm bad at reading, but I only figured this out by reading the source.
It would be nice if the documentation were made more explicit, but really I'd like a similar mechanism for things other than native libraries. For now I guess I'm going to just put a fake links
value in my Cargo.toml...