Expand description
§safe-rust
safe-rust is a safety-oriented utility crate that ensures your Rust
expressions are evaluated in a safe context.
This crate provides a single macro, safe!, which guarantees that the
enclosed expression is handled with the highest level of care.
§Why use safe-rust?
- Rust is safe — but sometimes you want to be extra sure.
- Improves confidence when reading critical code paths.
- Clearly communicates intent: this code is safe.
§Guarantees
- Zero runtime overhead
- Zero allocations
- Zero unsafe code
- Zero side effects
§Non-Goals
- Performance optimizations
- Additional safety checks
- Doing anything exceptional
§Example
use safe_rust::safe;
let value = safe!(2 + 2);
assert_eq!(value, 4);Use responsibly.
Macros§
- safe
- Ensures that an expression is evaluated safely.