For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rust

Install Rust using rustup, manage toolchains, and verify cargo for local development before deploying to Discloud.

🧾 Overview

Rust provides performance, memory safety, and predictable resource usage for APIs, workers, and bots. Install with rustup to manage toolchains locally before deploying.


📥 Installation (choose your OS)

1

Download the installer: https://win.rustup.rs/ (or use the PowerShell tab)

2

Run and accept defaults (installs to user profile).

Invoke-WebRequest https://win.rustup.rs/x86_64 -OutFile rustup-init.exe
.\rustup-init.exe

Verify

rustc --version
cargo --version

Update Toolchain

rustup update

Install via rustup script:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustc --version
cargo --version

Add Build Essentials (Debian/Ubuntu)

sudo apt update
sudo apt install -y build-essential pkg-config libssl-dev

Update

rustup update

Uninstall Rust (rustup and all toolchains)

rustup self uninstall

Install with rustup:

Add build tools (if not present):

Update:


🧰 Toolchains & Components

1

List installed

rustup toolchain list
2

Add nightly (optional)

rustup toolchain install nightly
3

Set default

rustup default stable
4

Add components (example)

rustup component add clippy rustfmt

🗂 Project Init

Create new project:

Run:

Format & lint:


🗃 Common Cargo Commands


📦 Dependency Management

Dependencies declared in Cargo.toml under [dependencies]:

Update lockfile:


🔄 Updating

Last updated