Skip to content
/ quit Public

Exit cleanly with an exit code.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

dylni/quit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quit

This crate allows cleanly exiting a program using a custom exit code, without the drawbacks of process::exit. Destructors will be called as usual, and the stack will be completely unwound.

It is always required to attach #[main] to the main function. Then, with_code can be called from almost anywhere in the program. Restrictions are noted in the documentation for that function.

GitHub Build Status

Usage

Add the following lines to your "Cargo.toml" file:

[dependencies]
quit = "2.0"

See the documentation for available functionality and examples.

Rust version support

The minimum supported Rust toolchain version is currently Rust 1.64.0.

Minor version updates may increase this version requirement. However, the previous two Rust releases will always be supported. If the minimum Rust version must not be increased, use a tilde requirement to prevent updating this crate's minor version:

[dependencies]
quit = "~2.0"

License

Licensing terms are specified in COPYRIGHT.

Unless you explicitly state otherwise, any contribution submitted for inclusion in this crate, as defined in LICENSE-APACHE, shall be licensed according to COPYRIGHT, without any additional terms or conditions.

About

Exit cleanly with an exit code.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages