[package] name = "libabort" description = "A abort function that doesn't require the standard library" version = "0.1.9" edition = "2018" repository = "https://github.com/Techcable/libabort.rust" license = "Apache-2.0 OR MIT" # Oldest supported version because: # - First release of Rust 2018 was 1.31 rust-version = "1.31" [dependencies] # Enable `feature = "libc"` to use the C standard library's `abort` 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. libc = { version = "0.2", optional = true, default-features = false } [build-dependencies] rustversion-detect = "0.1.3" [features] # Use the standard library abort function std = [] # 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. always-immediate-abort = [] # Use the `trap` function as an abort implementation # # If the trap function is unsupported, this will do nothing. abort-via-trap = [] [package.metadata.docs.rs] # Enable features needed to document `immediate_abort` features = ["std", "libc"]