{"id":15031736,"url":"https://github.com/crusty-pie/toolchain","last_synced_at":"2025-10-04T05:30:45.351Z","repository":{"id":200161786,"uuid":"705262937","full_name":"crusty-pie/toolchain","owner":"crusty-pie","description":"🛠️ GitHub Action for `rustup` commands 🦀","archived":false,"fork":true,"pushed_at":"2024-05-22T18:36:51.000Z","size":2553,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-05-22T19:47:25.302Z","etag":null,"topics":["cargo","github","github-actions","install","rust","rust-lang","rust-language","rustup","setup-rust","toolchain"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/rust-toolchain-reborn","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"actions-rs/toolchain","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crusty-pie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-15T14:24:33.000Z","updated_at":"2024-05-22T18:36:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1dbad64-cff4-48ca-83e1-80dfda31bcfa","html_url":"https://github.com/crusty-pie/toolchain","commit_stats":null,"previous_names":["placintaalexandru/toolchain","crusty-pie/toolchain"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crusty-pie%2Ftoolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crusty-pie%2Ftoolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crusty-pie%2Ftoolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crusty-pie%2Ftoolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crusty-pie","download_url":"https://codeload.github.com/crusty-pie/toolchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235222539,"owners_count":18955327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","github","github-actions","install","rust","rust-lang","rust-language","rustup","setup-rust","toolchain"],"created_at":"2024-09-24T20:16:26.393Z","updated_at":"2025-10-04T05:30:45.344Z","avatar_url":"https://github.com/crusty-pie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action - `rust-toolchain-reborn`\n\n![GitHub](https://img.shields.io/github/license/crusty-pie/toolchain?label=License\u0026color=blue\u0026logo=gitbook)\n![Unit tests](https://github.com/crusty-pie/toolchain/workflows/Unit%20tests/badge.svg)\n![CodeQL](https://github.com/crusty-pie/toolchain/workflows/CodeQL/badge.svg)\n![Dependabot enabled](https://img.shields.io/badge/Dependabot-Enabled-brightgreen?logo=dependabot)\n![GitHub contributors](https://img.shields.io/github/contributors/crusty-pie/toolchain?logo=github\u0026label=Contributors)\n[![Codecov](https://img.shields.io/codecov/c/github/crusty-pie/toolchain?logo=codecov\u0026label=Coverage)](https://app.codecov.io/gh/crusty-pie/toolchain)\n![GitHub release (with filter)](https://img.shields.io/github/v/release/crusty-pie/toolchain?logo=github\u0026label=Release\u0026color=brightgreen)\n![GitHub issues](https://img.shields.io/github/issues-raw/crusty-pie/toolchain?label=Open%20Issues\u0026logo=github\u0026color=blue)\n![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/crusty-pie/toolchain?label=Closed%20Issues\u0026logo=github\u0026color=blue)\n![GitHub last commit (branch)](https://img.shields.io/github/last-commit/crusty-pie/toolchain/main?label=Last%20Commit\u0026logo=github\u0026color=blue)\n[![Snyk Security](https://img.shields.io/badge/Snyk%20Security-monitored-8731E8?logo=snyk)](https://snyk.io/test/github/crusty-pie/toolchain)\n[![Depfu](https://badges.depfu.com/badges/8e038d781d5d5ea4c2be016401319803/status.svg)](https://depfu.com)\n[![Depfu](https://img.shields.io/depfu/dependencies/github/crusty-pie%2Ftoolchain?logo=depfu)](https://depfu.com/repos/github/crusty-pie/toolchain)\n[![Depfu](https://badges.depfu.com/badges/07d8712d1903c3495e6cfeacd170c437/count.svg)](https://depfu.com/github/crusty-pie/toolchain?project_id=39503)\n[![Public workflows that use this action](https://img.shields.io/endpoint?label=Used%20By\u0026url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dplacintaalexandru%2Ftoolchain%26badge%3Dtrue)](https://sourcegraph.com/search?q=context:global+crusty-pie/toolchain+file:.github/workflows\u0026patternType=literal)\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-rust--toolchain--reborn-b7410e?logo=github)](https://github.com/marketplace/actions/rust-toolchain-reborn)\n\nThis GitHub Action installs\n[Rust toolchain](https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification)\nwith the help of [rustup](https://github.com/rust-lang/rustup).\n\nIt supports additional targets, components, profiles and handles all these small\npaper cuts for you.\n\n## Table of Contents\n\n- [GitHub Action - `rust-toolchain-reborn`](#github-action---rust-toolchain-reborn)\n  - [Table of Contents](#table-of-contents)\n  - [Example workflow](#example-workflow)\n  - [Inputs](#inputs)\n  - [Outputs](#outputs)\n  - [Profiles](#profiles)\n  - [Components](#components)\n  - [The toolchain file](#the-toolchain-file)\n  - [License](#license)\n  - [Contribute and support](#contribute-and-support)\n\n## Example workflow\n\n```yaml\non: [push]\n\nname: build\n\njobs:\n    check:\n        name: Rust project\n        runs-on: ubuntu-latest\n        steps:\n            - uses: actions/checkout@v4\n            - name: Install latest nightly\n              uses: crusty-pie/toolchain@v1\n              with:\n                  toolchain: nightly\n                  override: true\n                  components: rustfmt, clippy\n\n            # `cargo check` command here will use installed `nightly`\n            # as it is set as an \"override\" for current directory\n            - name: Run cargo check\n              run: cargo check\n```\n\n## Inputs\n\n| Name         | Required | Description                                                                                                                                         | Type   | Default |\n|--------------|:--------:|-----------------------------------------------------------------------------------------------------------------------------------------------------|--------|---------|\n| `toolchain`  |  false   | [Toolchain](https://github.com/rust-lang/rustup.rs#toolchain-specification) name to use, ex. `stable`, `nightly`, `nightly-2019-04-20`, or `1.32.0` | string | stable  |\n| `profile`    |  false   | Execute `rustup set profile {value}` before installing the toolchain, ex. `minimal`                                                                 | string | default |\n| `components` |  false   | Comma-separated list of the additional components to install, ex. `clippy, rustfmt`                                                                 | string | ''      |\n| `targets`    |  false   | Comma-separated list of the additional targets for the toolchain, ex. `x86_64-apple-darwin`                                                         | string | ''      |\n| `default`    |  false   | Set installed toolchain as a default toolchain                                                                                                      | bool   | false   |\n| `override`   |  false   | Set installed toolchain as an override for the current directory                                                                                    | bool   | false   |\n| `force`      |  false   | Force an update, even if some components are missing                                                                                                | bool   | false   |\n\nNote: since `v1.0.4` version, `toolchain` input is not marked as required\n to support toolchain files.\nSee the details [below](#the-toolchain-file).\n\n## Outputs\n\nInstalled `rustc`, `cargo` and `rustup` versions can be fetched from the Action outputs:\n\n| Name         | Description        | Example                         |\n|--------------|--------------------|---------------------------------|\n| `rustc`      | Rustc version      | `1.40.0 (73528e339 2019-12-16)` |\n| `rustc_hash` | Rustc version hash | `73528e339`                     |\n| `cargo`      | Cargo version      | `1.40.0 (bc8e4c8be 2019-11-22)` |\n| `rustup`     | rustup version     | `1.21.1 (7832b2ebe 2019-12-20)` |\n\nNote: `rustc_hash` output value can be used with [actions/cache](https://github.com/actions/cache) Action\nto store cache for different Rust versions, as it is unique across different Rust versions and builds (including `nightly`).\n\n## Profiles\n\nThis Action supports rustup [profiles](https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html#profiles),\nwhich can be used to speed up the workflow execution by installing the\nminimally required to be set of components, for example:\n\n```yaml\n- name: Install minimal nightly\n  uses: crusty-pie/toolchain@v1\n  with:\n    profile: minimal\n    toolchain: nightly\n```\n\nThis Action will automatically run `rustup self update` if `profile` input is set\nand the installed `rustup` version does not support them.\n\nTo provide backwards compatibility for `v1` version, there is no value for\n`profile` input set by default, which means that the `default` profile is used\nby `rustup` (and that includes `rust-docs`, `clippy` and `rustfmt`).\n\nYou may want to consider using `profile: minimal` to speed up toolchain installation.\n\n## Components\n\nThis Action supports rustup [components](https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html#installing-the-latest-compatible-nightly) too,\nand in combination with the [profiles](#profiles) input it allows to install only the needed components:\n\n```yaml\n- name: Install minimal stable with clippy and rustfmt\n  uses: crusty-pie/toolchain@v1\n  with:\n    profile: minimal\n    toolchain: stable\n    components: rustfmt, clippy\n```\n\nAs an extra perk, `rustup \u003e= 1.20.0` is able to find the most recent `nightly` toolchain\nwith the requested components available; next example is utilizing this feature\nto install the minimal set of `nightly` toolchain components with the `rustfmt` and `clippy` extras:\n\n```yaml\n- name: Install minimal nightly with clippy and rustfmt\n  uses: crusty-pie/toolchain@v1\n  with:\n    profile: minimal\n    toolchain: nightly\n    components: rustfmt, clippy\n```\n\nIn case if `nightly` toolchain is requested and one of the components is missing in\nlatest `nightly` release, this Action will attempt the downgrade till it find\nthe most recent `nightly` with all components needed.\n\nNote that this behavior will work only if the following two conditions apply:\n\n 1. `toolchain` input is `nightly` exactly.\n 2. At least one component is provided in `components` input.\n\nSame to the `profile` input, if installed `rustup` does not support\n\"components\" it will be automatically upgraded by this Action.\n\n## The toolchain file\n\nThis Action supports [toolchain files](https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file),\nso it is not necessary to use `toolchain` input anymore.\n\nInput has higher priority, so if you want to use toolchain file,\nyou need to remove the input from the workflow file.\n\nIf neither `toolchain` input or `rust-toolchain` file are provided,\nAction execution will fail.\n\n## License\n\nThis Action is distributed under the terms of the MIT license.\nSee [LICENSE](https://github.com/crusty-pie/toolchain/blob/main/LICENSE) for details.\n\n## Contribute and support\n\nAny contributions are welcomed!\n\nIf you want to report a bug or have a feature request,\ncheck the [Contributing guide](https://github.com/crusty-pie/toolchain/blob/main/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrusty-pie%2Ftoolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrusty-pie%2Ftoolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrusty-pie%2Ftoolchain/lists"}