Skip to content

Commit 69442b6

Browse files
committed
✨ Updating section 01
1 parent 94a6b5e commit 69442b6

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

source/docs/a2.installation.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,22 @@ title: Installation
44
## Rustup
55
There are many ways to install Rust on your system. For the moment the official way to install Rust is using [Rustup](https://rustup.rs/).
66

7-
[📖](https://github.com/rust-lang/rustup#rustup-the-rust-toolchain-installer) Rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between **stable, beta, and nightly** compilers and keep them updated. It makes **cross-compiling** simpler with binary builds of the standard library for common platforms.
8-
9-
[📖](https://github.com/rust-lang/rustup#installation) Rustup installs **`rustc`, `cargo`, `rustup`** and other standard tools to Cargo's `bin` directory. On Unix it is located at `$HOME/.cargo/bin` and on Windows at `%USERPROFILE%\.cargo\bin`. This is the same directory that `cargo install` will install Rust programs and Cargo plugins.
10-
11-
💡 More information can be found on the [Github repository of Rustup project](https://github.com/rust-lang/rustup#rustup-the-rust-toolchain-installer).
7+
[📖](https://rust-lang.github.io/rustup/index.html) Rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between **stable, beta, and nightly** compilers and keep them updated. It makes **cross-compiling** simpler with binary builds of the standard library for common platforms.
8+
9+
[📖](https://rust-lang.github.io/rustup/installation/index.html) Rustup installs **`rustc`, `cargo`, `rustup`** and other standard tools to Cargo's `bin` directory. On Unix it is located at `$HOME/.cargo/bin` and on Windows at `%USERPROFILE%\.cargo\bin`. This is the same directory that `cargo install` will install Rust programs and Cargo plugins.
10+
11+
> 🔎 The main tools Rustup installs to the Cargo's `bin` directory,
12+
> - `rustc`: The Rust compiler.
13+
> - `cargo`: The Rust’s built-in package manager and the build system.
14+
> - `rustup`: The Rust toolchain installer.
15+
> - `rustfmt`: The Rust’s official tool of formatting Rust code according to style guidelines.
16+
> - `cargo-fmt`: Helps to run `rustfmt` on whole Rust projects, including multi-crate workspaces.
17+
> - `cargo-clippy`: A lint tool that provides extra checks for common mistakes and stylistic choices.
18+
> - `cargo-miri`:An experimental Rust interpreter, which can be used for checking for undefined-behavior.
19+
> - `rls`: A language server that provides support for editors and IDEs.
20+
> - `rustdoc`: A local copy of the Rust documentation.
21+
22+
## Installation
1223

1324
### For Mac and Linux Users
1425
```bash

source/docs/a3.hello_world.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ fn main() {
3131
fn main() {
3232
println!("{}, {}!", "Hello", "world"); // Hello, world!
3333
println!("{0}, {1}!", "Hello", "world"); // Hello, world!
34-
println!("{greeting}, {name}!", greeting="Hello", name="world"); // Hello, world!
34+
println!("{greeting}, {name}!", greeting = "Hello", name = "world"); // Hello, world!
3535

36-
println!("{:?}", [1,2,3]); // [1, 2, 3]
37-
println!("{:#?}", [1,2,3]);
36+
let (greeting, name) = ("Hello", "world"); // 💡 Two Variable bindings declare & initialize in one line.
37+
println!("{greeting}, {name}!"); // Hello, world!
38+
39+
println!("{:?}", [1, 2, 3]); // [1, 2, 3]
40+
println!("{:#?}", [1, 2, 3]);
3841
/*
3942
[
4043
1,

0 commit comments

Comments
 (0)