Learn about the Rust programming language.
From a Data Science & Analytics Club workshop, held February 4, 2025. Slides.
-
Clone the repo as usual to your local workstation.
-
This repo includes submodules. To initialize (fetch) all submodules, run this:
git submodule init git submodule update
-
To do these two steps at once, try this command:
git clone --recurse-submodules [email protected]:uvads/learn-rust.git
To work with Rust it is recommended that you install rustup
which includes Cargo and other utilities. Cargo does the following:
- Init new Rust projects
- Package manager
- Compiler
- Runs tests
- Publish packages/releases to https://crates.io/
-
Create a new application using cargo:
cargo new my-new-project
-
cd
into the new project and take inventory of the resources created for you. -
Edit the
src/main.rs
file and be sure to include amain()
function (this drives everything). -
To build+run at the same time:
cargo run
-
To build a release:
cargo build cargo build --release