-
Notifications
You must be signed in to change notification settings - Fork 2.9k
DEP_FOO_KEY-like system that can work without "links" #3544
Copy link
Copy link
Open
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-environment-variablesArea: environment variablesArea: environment variablesA-linksArea: `links` native library links settingArea: `links` native library links settingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-environment-variablesArea: environment variablesArea: environment variablesA-linksArea: `links` native library links settingArea: `links` native library links settingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#any-build-script-metadata
Implementation: #16436
Would it make sense to allow usage of
DEP_<name>_<keyenvironment variables in abuild.rsfor dependencies that do not link to native libraries?Context: I would like to allow crates like this one to expose Cap'n Proto schema definitions, and in particular to allow Cap'n Proto's import mechanism to work across crate boundaries. (See capnproto/capnpc-rust#30.)
For example, say I write a
my_appcrate that depends on thesandstormcrate, and I wantmy_appto have some capnp schemas that import from thesandstormschemas. For this to work, themy_appbuild.rsneeds to know where to find the source code of thesandstormschemas. One way to accomplish that would be for thesandstormcrate'sbuild.rsto write its current working directory to aDEP_SANDSTORM_IMPORTenvironment variable, through the mechanism described here. However, that only works if thesandstormcrate has a "links" field in itsCargo.toml. Since thesandstormcrate does not actually need to link to a native library, adding such a field feels superfluous and possibly prone to mysterious bugs.