actions-rs / toolchain

🛠️ GitHub Action for `rustup` commands
https://github.com/marketplace/actions/rust-toolchain
MIT License
585 stars 86 forks source link

Add support for rust-toolchain.toml #209

Open zephraph opened 2 years ago

zephraph commented 2 years ago

Fixes #208

This matches the behavior in rustup's docs namely:

the toolchain can be named in the project's directory in a file called rust-toolchain.toml or rust-toolchain. If both files are present in a directory, the latter is used for backwards compatibility.


The previous implementation only supported a rust-toolchain file that included only the name. This is largely considered a legacy format at this point. I added fast-toml in order to be able to parse out the channel value. Technically channel is mutually exclusive with path that can also be specified to point to a file that contains the toolchain value somewhere else, but I've left that out of this implementation.


If folks stumble across this PR and need this functionality you can use @oxidecomputer's fork at https://github.com/oxidecomputer/actions-rs_toolchain until this is merged.

boozook commented 2 years ago

Tested there, works 👍

JasonShin commented 2 years ago

Hi, it would be good to get this merged, is there anything that I can help to move it forward?

mateimicu commented 2 years ago

Hello,

I am also interested in this change. I can help if something is blocking it.

smallstepman commented 2 years ago

@mateimicu see https://github.com/actions-rs/toolchain/issues/216