01-rust01
Original...Less than 1 minute
1. Install
When I Use Mac OS : input the following command in your terminal
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
choose 1 to continue the installation
2. other commands in Terminal
- commands for install
⚠️Check whether the Rust Environment is installed correctly. The following shows the information from rust on your computer containing the version of rust
Prüfen Sie, ob das Rust Environment richtig installiert wird. Folgend zeigt die Informantion von rust auf deine Computer enthalrend Version des rustes
1. rustup update
rustup update
![the information of this picture:rustc+[the_version]+(commit hash+yyyy-mm-dd)](./note1.assets/Bildschirmfoto 2023-10-26 um 02.09.22.png)
2. rustc --version
rustc -V
rustc --version #for windows!!!
3. rustup self uninstall
rustup self uninstall
4. rustc doc
rustc doc
view the lolal rust instruction document
5. cargo new --bin name
cargo new --bin main
6. cargo run --package name
Hello, World
How does “Hello, World” look like in rust.
fn main() {
println!("Hello, world!");
}
_
cargo run --package main
Powered by Waline v3.1.3