Skip to main content

Rust

This guide covers setting up Rust development with rustup and Cargo.

Installation

We recommend using rustup, the official Rust toolchain installer.

# Using winget
winget install Rustlang.Rustup

# Restart your terminal after installation

Or download the installer from rustup.rs.

info

On Windows, you may need to install the Visual Studio C++ Build Tools for linking.

Verify Installation

rustc --version
cargo --version

Cargo

Cargo is Rust's build system and package manager. It handles dependency management, compilation, testing, and publishing.

Common Cargo Commands

# Create a new project
cargo new my-project

# Build project
cargo build

# Build optimized release
cargo build --release

# Run project
cargo run

# Run tests
cargo test

# Format code
cargo fmt

# Lint code
cargo clippy

Set Up Cargo with JFrog

  1. Go to https://p6m.jfrog.io
  2. Login
  3. Navigate to Profile → Set Me Up → Cargo
  4. Click Generate Token and Create Instructions
  5. Follow the instructions to configure your ~/.cargo/config.toml