Hello World with Rust and Cargo
In this short video we'll see how to create a Hello World! program using the Rust Programming language and the Cargo package manager.
Create a new project with the brilliant name "abcd"
cargo new abcd
cd abcd
The directory layout:
. ├── Cargo.toml └── src └── main.rs
examples/rust/abcd/Cargo.toml
[package] name = "abcd" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies]
examples/rust/abcd/src/main.rs
fn main() { println!("Hello, world!"); }
Compile and run your program:
cargo run
Published on 2022-10-21