Skip to content

Commit

Permalink
Small changes to manual component installation instructions (#29)
Browse files Browse the repository at this point in the history
I caught a few things after #28 was merged, so this implements them. I
modified the component installation command to target the specific
nightly version that we have pinned, since that should be the only
toolchain that should matter.
  • Loading branch information
BD103 authored Sep 3, 2024
1 parent 6c7ae2f commit b310679
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ A Bevy CLI tool.

## Nightly Rust

The Bevy CLI includes a [custom linter](bevy_lint) that integrates directly with `rustc` through [`#![feature(rustc_private)]`](https://doc.rust-lang.org/nightly/unstable-book/language-features/rustc-private.html).Because of this, building this project requires nightly Rust with the `rustc-dev` component. If you use Rustup, a pinned version will be automatically installed when you compile this project based on the contents of [`rust-toolchain.toml`](rust-toolchain.toml).
The Bevy CLI includes a [custom linter](bevy_lint) that integrates directly with `rustc` through [`#![feature(rustc_private)]`](https://doc.rust-lang.org/nightly/unstable-book/language-features/rustc-private.html). Because of this, building this project requires nightly Rust with the `rustc-dev` component. If you use Rustup, a pinned version will be automatically installed when you compile this project based on the contents of [`rust-toolchain.toml`](rust-toolchain.toml).

However, some components may be still missing due to a [`rustup` bug](https://github.com/rust-lang/rustup/issues/3255). If you get `can't find crate` errors when trying to build, run the following commands to manually add the required components:

```
rustup component add rustc-dev llvm-tools-preview
rustup component add --toolchain nightly rustc-dev llvm-tools-preview
```bash
rustup component add --toolchain nightly-2024-08-21 rustc-dev llvm-tools-preview
```
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# If you modify this file, please also update `RUST_TOOLCHAIN` in `.github/workflows/ci.yml` and
# the `clippy_utils` version in `bevy_lint/Cargo.toml`.
# If you modify this file, please also update `RUST_TOOLCHAIN` in `.github/workflows/ci.yml`, the
# `clippy_utils` version in `bevy_lint/Cargo.toml`, and the toolchain in `README.md`.

[toolchain]
# Writing custom lints requires using nightly Rust. We pin to a specific version of nightly version
Expand Down

0 comments on commit b310679

Please sign in to comment.