feat(toml): Parse support for multiple build scripts by namanlp · Pull Request #15630 · rust-lang/cargo (original) (raw)
Hi Everyone!
This is PR for the manifest parsing of the first milestone of GSoC Project : Build Script Delegation
What does this PR try to resolve?
Currently, just a single build script is allowed for each package. This PR will allow users to create and use multiple build scripts, and is backward compatible with single script as well as boolean values.
Motivation : This will help users to maintain separate smaller and cleaner build scripts instead of one large build script. This is also necessary for build script delegation.
Open questions:
- What should the build script target names be?
- Currently they use the file stem of the build script which could run into conflicts
Known Issues:
- This is just parsing support, and currently, only the first build script of the array is actually executed.
How to test and review this PR?
There is a feature gate multiple-build-scripts that can be passed via cargo-features in Cargo.toml. So, you have to add
cargo-features = ["multiple-build-scripts"]
Preferably on the top of the Cargo.toml and use nightly toolchain to use the feature
This PR is ready to be reviewed and merged