Compile a Rust package. Similar to
cargo build
, but you can pass extra options to the compiler. Seerustc --help
for all available options. More information: https://doc.rust-lang.org/cargo/commands/cargo-rustc.html.
rustc
:cargo rustc -- rustc_options
cargo rustc --release
cargo rustc --release -- -C target-cpu=native
cargo rustc -- -C opt-level 1|2|3
z
also turns off loop vectorization):cargo rustc -- -C opt-level s|z
cargo rustc --lib -- -D unsafe-code
cargo rustc --package package
cargo --bin name