mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-04 09:13:30 +02:00
Add details shortcode
This commit is contained in:
@@ -6,17 +6,16 @@ title = "Setup"
|
||||
|
||||
## Installing Rust
|
||||
|
||||
Before installing Rustlings, you need to have the **latest version of Rust** installed.
|
||||
Visit [www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install) for further instructions on installing Rust.
|
||||
Before installing Rustlings, you must have the **latest version of Rust** installed.
|
||||
Visit [www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install) for further instructions.
|
||||
This will also install _Cargo_, Rust's package/project manager.
|
||||
|
||||
> 🐧 If you are on Linux, make sure you have installed `gcc` (for a linker).
|
||||
> 🐧 If you are on Linux, make sure you have `gcc` installed (_for a linker_).
|
||||
>
|
||||
> Deb: `sudo apt install gcc`
|
||||
>
|
||||
> Dnf: `sudo dnf install gcc`
|
||||
> Debian: `sudo apt install gcc`\
|
||||
> Fedora: `sudo dnf install gcc`
|
||||
|
||||
> 🍎 If you are on MacOS, make sure you have installed Xcode and its developer tools by running `xcode-select --install`.
|
||||
> 🍎 If you are on MacOS, make sure you have _Xcode and its developer tools_ installed: `xcode-select --install`
|
||||
|
||||
## Installing Rustlings
|
||||
|
||||
@@ -26,14 +25,13 @@ The following command will download and compile Rustlings:
|
||||
cargo install rustlings
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>If the installation fails…</strong> (<em>click to expand</em>)</summary>
|
||||
{% details(summary="If the installation fails…") %}
|
||||
|
||||
> - Make sure you have the latest Rust version by running `rustup update`
|
||||
> - Try adding the `--locked` flag: `cargo install rustlings --locked`
|
||||
> - Otherwise, please [report the issue](https://github.com/rust-lang/rustlings/issues/new)
|
||||
- Make sure you have the latest Rust version by running `rustup update`
|
||||
- Try adding the `--locked` flag: `cargo install rustlings --locked`
|
||||
- Otherwise, please [report the issue](https://github.com/rust-lang/rustlings/issues/new)
|
||||
|
||||
</details>
|
||||
{% end %}
|
||||
|
||||
## Initialization
|
||||
|
||||
@@ -43,18 +41,17 @@ After installing Rustlings, run the following command to initialize the `rustlin
|
||||
rustlings init
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>If the command <code>rustlings</code> can't be found…</strong> (<em>click to expand</em>)</summary>
|
||||
{% details(summary="If the command <code>rustlings</code> can't be found…") %}
|
||||
|
||||
> You are probably using Linux and installed Rust using your package manager.
|
||||
>
|
||||
> Cargo installs binaries to the directory `~/.cargo/bin`.
|
||||
> Sadly, package managers often don't add `~/.cargo/bin` to your `PATH` environment variable.
|
||||
>
|
||||
> - Either add `~/.cargo/bin` manually to `PATH`
|
||||
> - Or uninstall Rust from the package manager and [install it using the official way with `rustup`](https://www.rust-lang.org/tools/install)
|
||||
You are probably using Linux and installed Rust using your package manager.
|
||||
|
||||
</details>
|
||||
Cargo installs binaries to the directory `~/.cargo/bin`.
|
||||
Sadly, package managers often don't add `~/.cargo/bin` to your `PATH` environment variable.
|
||||
|
||||
- Either add `~/.cargo/bin` manually to `PATH`
|
||||
- Or uninstall Rust from the package manager and [install it using the official way with `rustup`](https://www.rust-lang.org/tools/install)
|
||||
|
||||
{% end %}
|
||||
|
||||
Now, go into the newly initialized directory and launch Rustlings for further instructions on getting started with the exercises:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user