[package] name = "cargo_crateio" version = "0.1.0" authors = ["bruce"] edition = "2021" description = "test" license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] [profile.dev] # opt-level决定rust在编译时,对代码进行什么程序的优化,0-3代表优化程序, 优化程序越低,编译更快,优化程序更高,运行更快 opt-level = 3 # 将此值改成1,再进行编译,可以发现编译时间变长 [profile.release] opt-level = 3