Rust
Rust 언어의 공식 toolchain과 프로젝트 개발 명령을 한곳에서 찾기 위한 안내 페이지.
Summary
Rust의 표준 개발 환경은 toolchain 관리자인 rustup, 컴파일러 rustc, 패키지·빌드 도구 cargo를 중심으로 구성된다. 기본 rustup profile에는 formatter인 rustfmt와 lint 도구인 clippy도 포함된다.
Installation
공식 권장 설치 방식은 rustup이다. 설치 후 새 shell을 열거나 Unix 계열에서 source "$HOME/.cargo/env"를 실행한다.
Linux / Unix / macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source "$HOME/.cargo/env"
$HOME/.cargo/bin의 PATH 우선순위로 실제 실행 파일이 달라질 수 있다.
Debian / Ubuntu
rustup 공식 문서가 안내하는 package manager 방식은 Debian 13 이상과 Ubuntu 24.04 이상에서 사용할 수 있다.
sudo apt update sudo apt install rustup rustup default stable
RHEL / Fedora
rustup 공식 문서는 DNF 계열 package manager가 rustup-init만 제공할 수 있다고 설명하지만 배포판별 package 이름을 고정해 제시하지 않는다. 이 경우 위의 공식 Unix 설치 script를 사용하고, 조직 정책상 RPM package가 필요하면 해당 배포판의 현재 package 정보를 먼저 확인한다.
macOS / Homebrew
brew install rustup
rustup default stable
Homebrew 배포에서는 proxy가 PATH에 자동 노출되지 않을 수 있으므로 $(brew –prefix rustup)/bin을 PATH에 추가해야 할 수 있다.
Windows / winget
winget install --exact --id Rustlang.Rustup
Windows의 MSVC target은 linker와 Windows SDK가 필요하다. rustup-init이 prerequisite 설치를 제안할 수 있으며, 조직에서는 Visual Studio edition의 license 조건도 확인한다.
Verify
rustup --version rustc --version cargo --version
Quick Start
cargo new hello-rust cd hello-rust cargo run cargo test cargo fmt --all -- --check cargo clippy --all-targets --all-features -- -D warnings
Command Map
- rustup: stable, beta, nightly toolchain과 component, target 관리.
- rustc: Rust crate를 직접 컴파일하고 compiler 정보를 조회.
- cargo: project 생성, dependency, build, test, package, publish 관리.
- rustfmt / cargo fmt: source format 정규화와 CI format 검사.
- Clippy / cargo clippy: 일반적인 실수와 비관용적 코드를 lint.
- rustdoc / cargo doc: API documentation과 documentation test 생성.
Environment
CARGO_HOME: Cargo cache, registry, installed binary, credential 관련 기본 root. Unix 기본값은$HOME/.cargo이다.RUSTUP_HOME: rustup toolchain과 metadata root. Unix 기본값은$HOME/.rustup이다.$CARGO_HOME/bin: rustup proxy와cargo install실행 파일이 놓이는 경로.
Troubleshooting
- 설치 후 명령을 찾지 못하면 새 shell을 열고
$HOME/.cargo/bin이 PATH에 포함되었는지 확인한다. - system package와 rustup을 함께 설치했다면
command -v rustc,rustup which rustc로 실제 compiler를 구분한다. - native dependency build가 실패하면 C compiler, linker, system header,
pkg-config같은 platform prerequisite를 확인한다.
Help
이 작업 환경에는 Rust toolchain이 설치되어 있지 않아 live help output을 수집하지 않았다. 각 하위 페이지의 공식 문서 링크와 `COMMAND --help`를 사용한다.
+
See Also
History
- codex:: 2026-07-20 Migrated the legacy Rust install snippet to a language head page and added the standard toolchain command family.