| Crates.io | libabort |
| lib.rs | libabort |
| version | 0.1.9 |
| created_at | 2024-05-20 16:35:33.133222+00 |
| updated_at | 2024-09-06 04:50:54.565582+00 |
| description | A abort function that doesn't require the standard library |
| homepage | |
| repository | https://github.com/Techcable/libabort.rust |
| max_upload_size | |
| id | 1245916 |
| size | 38,721 |
An implementation of the abort function that works without the standard library.
Provides an AbortGuard type to abort the process unless explicitly "defused".
This can prevent panics from unwinding in the middle of unsafe code,
which trivially makes the code exception safe.
The library offers multiple possible implementations, which can be controlled by using feature flags.
std::process::abort function.
This is enabled by using the "std" feature (disabled by default).abort function from the libc crate.
This requires linking against the C standard library, but not the Rust one.
This is enabled by using the "libc" feature (disabled by default).panic! implementation is known to abort instead of unwinding,
then the abort function simply triggers a panic.
This requires a recent version of Rust (1.60) in order to detect whether panics unwind or abort.abort function triggers a double-panic.
This always triggers an abort regardless of the rust version or compiler settings.Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.