axodotdev / axodotdev/cargo-dist
parse required-features from Cargo.tomls for better UX
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
If a package has a binary which requires a feature to build and that feature is not enabled then `cargo dist build` will fail.
#### cargo.toml
```toml
[[bin]]
name = "bin_name"
required-features = ["feature_to_enable_bin_name"]
```
#### `cargo dist build` output
```
failed to find bin bin_name (package 0.0.1 (path+file://....)) -- did the cargo
│ build above have errors?
```
https://github.com/axodotdev/cargo-dist/issues/274 suggests that this should have been fixed in `cargo-dist 0.2.0`, but the issue persists.
Contributor guide
Research direction
Reproduce the failure with a package whose Cargo.toml has a [[bin]] entry and required-features, then start from the cargo dist build path that discovers binaries. Compare behavior with the feature enabled and disabled; done means the required-feature metadata is handled so the build does not report the binary as mysteriously missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, cli, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100