Fra*_*ser 12 rust rust-cargo
我正在使用cargo build --release在发布配置中构建我的项目并cargo test构建和运行我的测试.
cargo build --release
cargo test
但是,我还想在发布模式下构建我的测试; 这可以用货物完成吗?
huo*_*uon 11
cargo test --release存在,但它与仅启用优化略有不同.例如,调试断言被禁用.
cargo test --release
您也可以opt-level在Cargo.toml 的[profile.test]部分进行设置,如Viktor Dahl所建议的那样.
opt-level
[profile.test]
归档时间:
10 年,6 月 前
查看次数:
3054 次
最近记录:
7 年,5 月 前