Per-target profiles?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
https://github.com/rust-lang/cargo/pull/4817
This commit enables incremental compilation by default […] A
profile.dev.incrementalfield is added toCargo.tomlto disable it on a per-project basis (in case of bugs).
I was hoping to use something like this:
[target.'cfg(windows)'.profile.dev]
incremental = false
to work around https://github.com/rust-lang/rust/issues/47186, but looking at src/cargo/util/toml/mod.rs it seems that target.cfg sections can only be combined with dependencies, not other sections like profile.
Would it make sense to add support for this?
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 src/cargo/util/toml/mod.rs, focusing on how target.cfg sections are currently combined with dependencies and how profile.dev.incremental is parsed. Determine whether the requested target-specific profile syntax can be supported, then verify that the setting works for the Windows target while preserving existing profile behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100