trying to get to know Rust.
Every Example has its own documentation in each folder.
Folder |
Description |
Keywords |
001-hello-world |
Basic hello-world example |
rustfmt,compiler |
002-adding-numbers |
adding some numbers and introducing variables |
variables,datatypes |
First installed visualstudio.microsoft.com/visual-cpp-build-tools/[Microsoft C Build Tools]. Tick C Build Tools and english language pack. Installation can take some time.
After this run rustup from the rust-lang.org Website.
Output of Rustup:
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
C:\Users\FabianLemke\.rustup
This can be modified with the RUSTUP_HOME environment variable.
The Cargo home directory is located at:
C:\Users\FabianLemke\.cargo
This can be modified with the CARGO_HOME environment variable.
The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:
C:\Users\FabianLemke\.cargo\bin
This path will then be added to your PATH environment variable by
modifying the HKEY_CURRENT_USER/Environment/PATH registry key.
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: x86_64-pc-windows-msvc
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
info: profile set to 'default'
info: default host triple is x86_64-pc-windows-msvc
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2023-11-16, rust version 1.74.0 (79e9716c9 2023-11-13)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
14.4 MiB / 14.4 MiB (100 %) 12.3 MiB/s in 1s ETA: 0s
info: downloading component 'rust-std'
19.7 MiB / 19.7 MiB (100 %) 12.4 MiB/s in 1s ETA: 0s
info: downloading component 'rustc'
58.4 MiB / 58.4 MiB (100 %) 12.3 MiB/s in 4s ETA: 0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
14.4 MiB / 14.4 MiB (100 %) 1.7 MiB/s in 14s ETA: 0s
info: installing component 'rust-std'
19.7 MiB / 19.7 MiB (100 %) 4.9 MiB/s in 3s ETA: 0s
info: installing component 'rustc'
58.4 MiB / 58.4 MiB (100 %) 5.5 MiB/s in 9s ETA: 0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'
stable-x86_64-pc-windows-msvc installed - (timeout reading rustc version)
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (%USERPROFILE%\.cargo\bin).
Press the Enter key to continue.
rustup isn’t only the installer but has some other tools too, which is called the toolchain.
Linux and MacOS is documented in the Rust Book
-
Official Rust-Book: doc.rust-lang.org/book/