Cargo Features
libabort has no features set by default.
[dependencies]
libabort = { version = "0.1.9", features = ["std", "always-immediate-abort", "abort-via-trap", "libc"] }
- std
-
Use the standard library abort function
- always-immediate-abort
-
Give a compilation error if
immediate_abort
can't be used, avoiding the fallback implementation.This compilation error is triggered in the library crate, not when the user invokes the code.
- abort-via-trap
-
Use the
trap
function as an abort implementationIf the trap function is unsupported, this will do nothing.
Features from optional dependencies
- libc implicit feature
-
Enables libc
Enable
feature = "libc"
to use the C standard library'sabort
function. This requires linking against the C standard library.We don't use the
dep:libc
syntax because we want to support versions before Rust 1.60 The default-features are disabled, to avoid using the Rust stdlib.