| Crates.io | trap |
| lib.rs | trap |
| version | 0.2.3 |
| created_at | 2025-10-25 17:28:09.50089+00 |
| updated_at | 2025-10-28 19:47:36.446975+00 |
| description | Bare metal trapping. |
| homepage | |
| repository | https://mandelbrot.dk/bjoernager/trap-rs/ |
| max_upload_size | |
| id | 1900451 |
| size | 20,937 |
trap-rsThis library provides the trap function for aborting Rust programmes without the std crate.
Fundamentally, the goal of this crate is to allow for abnormal programme termination with more or less the guarantee that execution of the current code path will stop.
Usually, std::process::abort is used for this, but on platforms or in crates without std, this is not possible.
The std feature can be enabled to allow for raising the SIGABRT signal when calling trap.
Furthermore, the nightly feature can be enabled for more architectural support in cases where the std crate isn't available.
Copyright © 2025 Gabriel Bjørnager Jensen.
trap-rs is distributed under either an MIT licence (see LICENCE-MIT.txt) or version 2.0 of the Apache License (see LICENCE-APACHE.txt), at your option.