download rust using curl
rustc is the compiler for rust which compiles
your rust code.
Creating a new project
cargo init command to create a new project.
This will generate a
src directory along with
.gitignore and a
cargo.toml file contains a basic hello world example. The example project is built using
cargo run command. The completed output will print status in the console and execute the program.
The compiled project is located in the new directory named target.
Compiling rust_sandbox v0.1.0 (/Users/hyperpro/Dev/Apps/rust_sandbox) Finished dev [unoptimized + debuginfo] target(s) in 0.79s Running `target/debug/rust_sandbox` Hello, world!
- For Development: cargo build
- For Production: cargo build --release