Skip to content

Commit 05e8f02

Browse files
committed
edit readme to use the install script
1 parent 9a14d72 commit 05e8f02

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,36 @@ Alternatively, for a first-time Rust learner, there's several other resources:
1313

1414
## Getting Started
1515

16-
To use `rustlings` you need to have [Rust](https://www.rust-lang.org/) installed on your computer. To install Rust, go to [rustup.rs](https://rustup.rs/).
16+
_Note: If you're on MacOS, make sure you've installed Xcode and its developer tools by typing `xcode-select --install`._
17+
18+
_Note: If you have Xcode 10+ installed, you also need to install the package file found at `/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg`._
19+
20+
You will need to have Rust installed. You can get it by visiting https://rustup.rs. This'll also install Cargo, Rust's package/project manager.
21+
22+
## MacOS/Linux
1723

18-
Once Rust is installed, clone the `rustlings` repository and enter the resulting directory:
24+
Just run:
1925

2026
```bash
21-
git clone https://github.com/rust-lang/rustlings.git
22-
cd rustlings
27+
curl -L https://git.io/rustlings | bash
28+
# Or if you want it to be installed to a different path:
29+
curl -L https://git.io/rustlings | bash -s mypath/
2330
```
2431

25-
_Note: If you're on MacOS, make sure you've installed Xcode and its developer tools by typing `xcode-select --install`._
32+
This will install Rustlings and give you access to the `rustlings` command. Run it to get started!
2633

27-
_Note: If you have Xcode 10+ installed, you also need to install the package file found at `/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg`._
34+
## Windows/Manually
2835

29-
Once in the directory you can install `rustlings` on your machine and run the introduction:
36+
Basically: Clone the repository, checkout to the latest tag, run `cargo install`.
3037

3138
```bash
32-
cargo install --path .
33-
rustlings
39+
git clone https://github.com/rust-lang/rustlings
40+
cd rustlings
41+
git checkout tags/1.0.0 # or whatever the latest version is (find out at https://github.com/rust-lang/rustlings/releases/latest)
42+
cargo install --force --path .
3443
```
3544

36-
If you choose to not install the `rustlings` command, just replace `rustlings` with `cargo run` in the rest of this text.
45+
Same as above, run `rustlings` to get started.
3746

3847
## Doing exercises
3948

0 commit comments

Comments
 (0)