Need to put more words to this, but: I think http://build.rs 's include!() macro behavior is alright, but not great. Either you use it to import real basic files only. Or you need to declare every dependency in Cargo.toml *twice*. One regular dep, and one build-dep.
To recap: 1. Regular dependencies aren't available in http://build.rs , leading to duplicated declarations 2. `include!()` is unhygienic A solution? Not sure. Ideally `extern crate` would work, but I'm *sure* there's reasons why it was chosen not to.
-
-
You don't want to wait for the entire deptree to build to run a potentially expensive build script. The common/intended use case for build scripts is compiling native deps or doing codegen, neither use case typically requires shared deps.
-
Rust tries to explicitly declare costs so if you don't need your build script to compile the entire deptree it won't. Consider factoring out the shared code into its own crate if possible.
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.