setup-rust-toolchain
setup-rust-toolchain copied to clipboard
Add option to specify rust-toolchain.toml path
Our rust code doesn't live in the root folder because the project contains both JS and Rust code, making it impossible for the action to pick up our rust-toolchain.toml file. It would be good if one could specify the path to the rust-toolchain.toml file(s) and have that be used.
We had a issue today with rust 1.82.0 in regards to Fastly that made us having to pin 1.81.0 but we had to do it in our rust-toolchain.toml and in the github action. This proposed option would make it less likely that we would forget to unpin the version in both places.
That sounds reasonable. Instead of a separate value, I think this could piggyback of the cache-workspaces input. That input allows specifying multiple workspaces, which might not work too well with the current installation code.
This would be pretty cool indeed!
My mono repo has 11 Rust projects inside currently. It would be great to support custom rust-toolchain.toml path such as
- name: Set up Rust
uses: actions-rust-lang/[email protected]
with:
rust-toolchain-file: path/to/rust-toolchain.toml
Thanks! ☺️
@jonasbb Our mono repository also contains a Rust workspace within a larger Node.js project. We are unable to pin a specific Rust version because our Cargo.toml is located within our Rust workspace and not the repository root. I am curious to know if there has been any progress on this enhancement or if an alternative approach exists to implement this feature. Thank you very much!
@jonasbb Same case for our monorepo that holding ~20 folders of services, but just ~10 of them are rust and eacch rust service require a dedicated different toolchain. Would like to have the ability to specify something like @hongbo-miao suggested.
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1...
with:
rust-toolchain-file: path/to/rust-toolchain.toml
Thanks in advance.
Support for this is added in v1.15 with the new rust-src-dir input.