mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-29 05:20:02 +00:00
docs: Add inputs to readme.
This commit is contained in:
parent
b07b2e2e9e
commit
7229efd154
2 changed files with 31 additions and 7 deletions
30
README.md
30
README.md
|
@ -15,6 +15,21 @@ jobs:
|
||||||
- run: cargo test
|
- run: cargo test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
The following inputs are available for the action, and can be passed via `with`. All inputs are
|
||||||
|
optional.
|
||||||
|
|
||||||
|
- `bins` - Comma-separated list of global binaries to install into Cargo.
|
||||||
|
- `cache` - Toggle caching of directories. Defaults to `true`.
|
||||||
|
- `cache-target` - Name of the target profile to cache. Defaults to `debug`.
|
||||||
|
- `channel` - Toolchain specification/channel to explicitly install.
|
||||||
|
- `components` - Comma-separated list of additional components to install.
|
||||||
|
- `inherit-toolchain` - Inherit all toolchain settings from the `rust-toolchain.toml` file. Defaults
|
||||||
|
to `false`.
|
||||||
|
- `targets` - Comma-separated list of additional targets to install.
|
||||||
|
- `profile` - Profile to install. Defaults to `minimal`.
|
||||||
|
|
||||||
## Configuring the Rust toolchain
|
## Configuring the Rust toolchain
|
||||||
|
|
||||||
This action will automatically install the appropriate toolchain with `rustup` by inspecting the
|
This action will automatically install the appropriate toolchain with `rustup` by inspecting the
|
||||||
|
@ -41,10 +56,11 @@ highest precedence.
|
||||||
channel: '1.65.0'
|
channel: '1.65.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Profile and components
|
### Profile, components, and targets
|
||||||
|
|
||||||
Furthermore, this action supports rustup profiles and components, which can be configured with the
|
Furthermore, this action supports rustup profiles, components, and targets, which can be configured
|
||||||
`profile` and `components` inputs respectively. When not defined, profile defaults to `minimal`.
|
with the `profile`, `components`, and `targets` inputs respectively. When not defined, profile
|
||||||
|
defaults to `minimal`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: moonrepo/setup-rust@v0
|
- uses: moonrepo/setup-rust@v0
|
||||||
|
@ -61,6 +77,14 @@ When using components, the input requires a comma separated list of component na
|
||||||
- run: cargo clippy --workspace
|
- run: cargo clippy --workspace
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When using targets, the input requires a comma separated list of target triples.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: moonrepo/setup-rust@v0
|
||||||
|
with:
|
||||||
|
targets: 'x86_64-pc-windows-msvc,x86_64-pc-windows-gnu'
|
||||||
|
```
|
||||||
|
|
||||||
## Installing Cargo binaries
|
## Installing Cargo binaries
|
||||||
|
|
||||||
If you require `cargo-make`, `cargo-nextest`, or other global binaries, this action supports
|
If you require `cargo-make`, `cargo-nextest`, or other global binaries, this action supports
|
||||||
|
|
|
@ -13,16 +13,16 @@ inputs:
|
||||||
description: 'Name of the target profile to cache.'
|
description: 'Name of the target profile to cache.'
|
||||||
default: 'debug'
|
default: 'debug'
|
||||||
channel:
|
channel:
|
||||||
description: 'Toolchain specification/channel to install.'
|
description: 'Toolchain specification/channel to explicitly install.'
|
||||||
components:
|
components:
|
||||||
description: 'Comma-separated list of additional components to install.'
|
description: 'Comma-separated list of additional components to install.'
|
||||||
|
inherit-toolchain:
|
||||||
|
description: 'Inherit all toolchain settings from the rust-toolchain.toml file.'
|
||||||
|
default: false
|
||||||
targets:
|
targets:
|
||||||
description: 'Comma-separated list of additional targets to install.'
|
description: 'Comma-separated list of additional targets to install.'
|
||||||
profile:
|
profile:
|
||||||
description: 'Profile to install. Defaults to "minimal".'
|
description: 'Profile to install. Defaults to "minimal".'
|
||||||
inherit-toolchain:
|
|
||||||
description: 'Inherit all toolchain settings from the rust-toolchain.toml file.'
|
|
||||||
default: false
|
|
||||||
outputs:
|
outputs:
|
||||||
cache-key:
|
cache-key:
|
||||||
description: 'The generated cache key used.'
|
description: 'The generated cache key used.'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue