-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-cargo-apiArea: cargo-the-library API and internal code issuesArea: cargo-the-library API and internal code issuesC-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-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewT-cargoTeam: CargoTeam: Cargodisposition-mergeFCP with intent to mergeFCP with intent to mergefinished-final-comment-periodFCP completeFCP complete
Description
Problem
Having a Rust API would help with several problems
- Help people migrate through build script best practices (e.g. Cannot extend build directives within cargo #11461)
- Avoid people making type mistakes
- Bring documentation more inline with people's workflow, e.g. IDEs auto-completing and rendering doc comments
- Help improve discoverability of APIs
- Ensures a feedback loop with the cargo team, hoping it avoids some failure modes where compatibility is broken
- Reduce duplicated effort
- build_script
- build-rs
- build-env
- vergen
- foreman <=0.4.0 (package name was handed off and used for a different purpose after that version)
- system-deps
- rsconf
Proposed Solution
A crate that provides an API for working with build scripts
- Low level API handling writing of directives, reading runtime env variables, etc (see also Official API for reading cargo env variables #12431)
- A higher level API to help with re-run-if-changed
Notes
Things to work out
- Name
- If we co-maintain, how repo and publish permissions work out
How do we handle the MSRV because the cargo repo currently only handles "latest" (see also fix: Set MSRV for internal packages #12381)see Set and verify all MSRVs in CI #12654
As for timing, it'd help if we had this to recommend before we fully resolve #11461 so we can tell people to migrate once, rather than twice
codyps, MolotovCherry, bukowa, IceTDrinker, TimDiekmann and 5 morekamulos, zicklag, dimpolo, bukowa, Aloso and 6 more
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-cargo-apiArea: cargo-the-library API and internal code issuesArea: cargo-the-library API and internal code issuesC-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-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewT-cargoTeam: CargoTeam: Cargodisposition-mergeFCP with intent to mergeFCP with intent to mergefinished-final-comment-periodFCP completeFCP complete