3 stable releases

1.0.50 Nov 19, 2023
1.0.38 Feb 19, 2023
1.0.37 Dec 10, 2022

#442 in Rust patterns

Download history 40232/week @ 2024-12-11 32616/week @ 2024-12-18 12655/week @ 2024-12-25 28695/week @ 2025-01-01 31310/week @ 2025-01-08 41489/week @ 2025-01-15 36169/week @ 2025-01-22 32385/week @ 2025-01-29 35514/week @ 2025-02-05 45028/week @ 2025-02-12 33737/week @ 2025-02-19 34458/week @ 2025-02-26 36088/week @ 2025-03-05 34626/week @ 2025-03-12 33761/week @ 2025-03-19 40926/week @ 2025-03-26

152,015 downloads per month
Used in 34 crates (3 directly)

MIT/Apache

25KB
354 lines

derive(Error) for no_std environments

This is a fork of thiserror using the nightly only, experimental error_in_core feature in no_std environments.

Usage

// Cargo.toml
[dependencies]
thiserror = { version = "1.0", package = "thiserror-core", default-features = false }

Compiler support: requires rustc 1.56+ @@ -23,200 +18,16 @@ thiserror = "1.0"

Example

// main.rs / lib.rs
#![no_std]
#![feature(error_in_core)]

Differences between thiserror and thiserror-core

Differences are kept to a minimum and changes in thiserror master will be adopted by rebasing thiserror-core.

With the default std feature enabled, any functional difference between thiserror and thiserror-core is considered a bug.

As soon as equivalent changes are adopted, this crate will be updated to re-export thiserror.

Dependencies

~185–610KB
~14K SLoC