-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux Rust Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to Rust programming language on Linux, covering Arch Linux, CachyOS, and other distributions including installation, Cargo, and development.
Using rustup (recommended):
# Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Reload shell
source ~/.cargo/envArch/CachyOS (system package):
# Install Rust
sudo pacman -S rust
# Install Cargo
sudo pacman -S cargoCheck Rust:
# Check version
rustc --version
cargo --versionNew project:
# Create project
cargo new my-project
# Or library
cargo new --lib my-libCargo commands:
# Build
cargo build
# Run
cargo run
# Test
cargo test
# Release build
cargo build --releaseBasic program:
fn main() {
println!("Hello, World!");
}Add dependencies:
# Cargo.toml
[dependencies]
serde = "1.0"Check installation:
# Check Rust
which rustc
which cargo
# Install if missing
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shCheck errors:
# Build with verbose output
cargo build --verbose
# Check Rust version
rustc --versionThis guide covered Rust installation, Cargo usage, and development for Arch Linux, CachyOS, and other distributions.
- Development Environment - Development setup
- VS Code Guide - VS Code setup
- Rust: https://www.rust-lang.org/
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.