DEV Community

Zhangwuji
Zhangwuji

Posted on

Rust release

setup cargo.toml

[profile.dev]
panic = 'abort'
Enter fullscreen mode Exit fullscreen mode

as you called cargo run
if your code happen panic!(); rust excutor dose not expand stack,Just exit main thread. let OS solve the error.

[profile.release]
panic = 'abort'
Enter fullscreen mode Exit fullscreen mode

as you called cargo run --release
if your code happen panic!(); rust excutor dose not expand stack,Just exit main thread. let OS solve the error.

--release mean product environment;the build time would be slow, but packaged file will small.

Top comments (0)