#unsafe #low-level #safety #performance

semisafe

Semi-safe utilities for performance-critical Rust

1 unstable release

Uses new Rust 2024

0.1.0 May 8, 2026

#1538 in Rust patterns

MIT or Apache-2.0

8KB
79 lines

semisafe

docs.rs Crates.io Version Crates.io License

semisafe is a crate containing semi-safe utilities for performance-critical Rust code. Every function in this crate is safe in debug mode and unsafe in release mode. This is meant to provide an improved alternative to strictly-unsafe methods like get_unchecked.

  • Only use these methods in places where the code should NEVER panic. Treat them as unchecked methods.
  • You should have comprehensive automated tests around code when using these functions. Run them in debug mode to catch unexpected behavior. Distribute in release mode to get the performance benefits.

Disclaimer: YOU PROBABLY DON'T NEED THIS CRATE. IF YOU AREN'T SURE WHETHER YOU NEED THIS CRATE, THEN YOU DON'T NEED THIS CRATE. This crate is intended for low-level, performance-critical code. You do not need it for everyday applications.

No runtime deps