Команда cargo-rustc: опции, ключи и примеры использования
cargo rustc
Compile a Rust package, and pass extra options to the compiler. More information: https://doc.rust-lang.org/cargo/commands/cargo-rustc.html.
- Build the package or packages defined by the
Cargo.toml
manifest file in the current working directory:
cargo rustc
- Build artifacts in release mode, with optimizations:
cargo rustc --release
- Compile with architecture-specific optimizations for the current CPU:
cargo rustc --release -- -C target-cpu=native
- Compile with speed optimization:
cargo rustc -- -C opt-level {{1|2|3}}
- Compile with [s]ize optimization (
z
also turns off loop vectorization):
cargo rustc -- -C opt-level {{s|z}}
- Check if your package uses unsafe code:
cargo rustc --lib -- -D unsafe-code
- Build a specific package:
cargo rustc --package {{package}}
- Build only the specified binary:
cargo --bin {{name}}
- 25 января вышло новое крупное обновление Age of Empires II DE: Lords of the West
- И снова sudo, и снова "решето"
- Только одна из десяти компаний ожидает, что все работники вернутся в офисы
- Google Play временно забанил видео-плеер за поддержку неправильных субтитров
- Google прекращает поддержку сторонних приложений в API Chrome-like