axodotdev / axodotdev/cargo-dist
System dependencies: extend "targets" mode to package manager installers
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
The initial version of #428 has a couple of distinct optional features:
* It's possible to specify that a dependency must be present at runtime, in which case it gets added as a dependency of package manager installers like Homebrew.
* It's possible to specify that a dependency should only be installed for one or more architectures, in which case it's skipped on others.
In the version of the feature we'll be shipping initially, these two features are exclusive of each other and don't interact. In otherwords, specifying a runtime dep whose `targets` limits it to only one architecture will still get installed on both. In the future, the Homebrew installer will be extended to take this into account. I plan to translate it to Homebrew's own arch-specific syntax; for example
```ruby
depends_on "libcue" if Hardware::CPU.intel?
depends_on "cmake" if Hardware::CPU.arm?
depends_on "rust"
```
Contributor guide
Assessment
This issue has not been assessed yet.