Allow specifying target-dependent build.rs scripts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Currently it is possible to specify something like following in Cargo.toml:
[target.'cfg(unix)'.build-dependencies.cc]
version = "1.0"
however it is not feasible to use this functionality, because you cannot conditionally extern use crates or specify per-target build.rs scripts (i.e. the following does not work):
[target.'cfg(unix)'.package]
build = "build/unix.rs"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the target-specific dependency example in Cargo.toml and the proposed build script path build/unix.rs. Trace how target-specific package metadata and build-dependencies are represented and selected. Done means a target can select its own build.rs script and conditionally use its build dependencies, with tests covering the unix example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100