CmdID

CmdID / Commands

cargo-rustc

Compile a Rust package. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Compile a Rust package. Similar to cargo build, but you can pass extra options to the compiler. See rustc --help for all available options.

Build the package and pass options to rustc

cargo rustc -- rustc_optionsIdentify

Build artifacts in release mode, with optimizations

cargo rustc --releaseIdentify

Compile with architecture-specific optimizations for the current CPU

cargo rustc --release -- --codegen target-cpu=nativeIdentify

Compile with speed optimizations

cargo rustc -- --codegen opt-level=1Identify

Compile with size optimizations (z also turns off loop vectorization)

cargo rustc -- --codegen opt-level=sIdentify

Check if your package uses unsafe code

cargo rustc --lib -- -D unsafe-codeIdentify

Build a specific package

cargo rustc --package packageIdentify

Build only the specified binary

cargo rustc --bin nameIdentify