简体   繁体   中英

Rust Cargo Releasing Unoptimized Issue

Why my project still saying "i am unoptimized"?

为什么我的项目仍然说“我未优化”?

I am doing a normal build and terminal says this build is unoptimized And i am doing a release build and it says it optimized but when i enter cargo check command it says unoptimized

Because unoptimized + debuginfo is the default for all commands in cargo.

To run any command in release, please add the --release flag as you already did with cargo build :

cargo check --release

For optimized builds in debug mode add these lines to your Cargo.toml :

[profile.dev]
opt-level = 3

You can find more information about customizing build profiles here: https://doc.rust-lang.org/book/ch14-01-release-profiles.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM