foundry-rs / foundry-rs/foundry
feat(`foundryup`): add `version` field to `foundry.toml` ("engines" equivalent) that is selected upon running `foundryup --use`
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 16h 38m
- Merged PRs (30d)
- 511
Description
### Component
Forge
### Describe the feature you would like
[npm has an engines ](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#engines)field that allows you to specify a specific engine such as pnpm, node > 18 ect.
Similarly it would be nice if in a foundry.toml we could specify that foundry has to be pinned to a specific version or higher than a specific version.
When running `foundryup --use` it looks at this version field and then activate the corresponding version, downloading if not available.
This would mirror the behavior of something like `nvm use`.
It is important that a user activates rather than switch automatically.
### Additional notes
One area that may be challenging to implement this is the `foundry-toolchain` as it would need to be aware of the `version` field in `foundry.toml` to select the version to install.
Contributor guide
Research direction
Start with the foundryup --use entry point and the foundry-toolchain area mentioned in the issue, then trace how foundry.toml is read and how versions are downloaded and activated. Done means a version requirement in foundry.toml is honored when explicitly running foundryup --use, including downloading an unavailable matching version without automatic switching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100