rustc
The Rust compiler. Processes, compiles and links Rust language source files. More information: <https://doc.rust-lang.org/rustc>.
Install
- All systems
-
curl cmd.cat/rustc.sh
- Debian
-
apt-get install rustc
- Ubuntu
-
apt-get install rustc
-
Alpine
-
apk add rust
- Arch Linux
-
pacman -S rust
- Kali Linux
-
apt-get install rustc
- Fedora
-
dnf install rust
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install rustc
- OS X
-
brew install rust
- Raspbian
-
apt-get install rustc
- Dockerfile
- dockerfile.run/rustc
- Docker
-
docker run cmd.cat/rustc rustc
powered by Commando
The Rust compiler. Processes, compiles and links Rust language source files. More information: <https://doc.rust-lang.org/rustc>.
-
Compile a single file:
rustc file.rs
-
Compile with high optimization:
rustc -O file.rs
-
Compile with debugging information:
rustc -g file.rs
-
Compile with architecture-specific optimizations for the current CPU:
rustc -C target-cpu=native path/to/file.rs
-
Display architecture-specific optimizations for the current CPU:
rustc -C target-cpu=native --print cfg
-
Display target list:
rustc --print target-list
-
Compile for a specific target:
rustc --target target_triple path/to/file.rs
© tl;dr; authors and contributors