trap

Crates.iotrap
lib.rstrap
version0.2.3
created_at2025-10-25 17:28:09.50089+00
updated_at2025-10-28 19:47:36.446975+00
descriptionBare metal trapping.
homepage
repositoryhttps://mandelbrot.dk/bjoernager/trap-rs/
max_upload_size
id1900451
size20,937
Gabriel Bjørnager Jensen (bjoernager)

documentation

https://docs.rs/trap/

README

trap-rs

This 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.

Features

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 & licence

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.

Commit count: 0

cargo fmt