| Crates.io | lithium |
| lib.rs | lithium |
| version | 1.0.4 |
| created_at | 2024-10-30 21:44:02.783666+00 |
| updated_at | 2025-06-04 01:23:56.790317+00 |
| description | Lightweight exceptions |
| homepage | |
| repository | https://github.com/iex-rs/lithium |
| max_upload_size | |
| id | 1429265 |
| size | 148,905 |
Lightweight exceptions.
Lithium provides a custom exception mechanism as an alternative to Rust panics. Compared to Rust panics, this mechanism is allocation-free, avoids indirections and RTTI, and is hence faster, if less applicable.
On nightly, Lithium is more than 2x faster than Rust panics on common Result-like usecases. See the benchmark.
See documentation for usage and installation instructions.