Rob's Wiki
Search…
Rust

Installation

Install rustup:
brew install rustup-init
rustup-init
rustup update
rustup component add rls-preview rust-analysis rust-src

Hello World

// hello.rs
fn main() {
println!("Hello World!");
}
rustc hello.rs
./hello

Packaging etc

  • Packaging is done with Cargo
  • Each distributed package is called a Crate
  • The primary Crate registry is Crates.io
  • A simple starting guide is here
To create a new project, then compile and run it:
cargo new rust_example
cd rust_example
cargo run
Last modified 3yr ago
Copy link
On this page
Installation
Hello World
Packaging etc