iex-rs/lithium

Lightweight exceptions for Rust

Rust

103

231 commits

updated Aug 31, 2026

See the code

README

Lithium

License Version docs.rs Tests

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.

Contributors

purplesyringa

218 commits

sylfn

13 commits

iex-rs/lithium

Lightweight exceptions for Rust

Rust

103

231 commits

updated Aug 31, 2026

See the code

README

Lithium

License Version docs.rs Tests

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.

Contributors

purplesyringa

218 commits

sylfn

13 commits

Languages

Rust

98.3%

Shell

1.3%