Skip to content

Commit

Permalink
Merge pull request #754 from cryspen/jonas/std-error
Browse files Browse the repository at this point in the history
Use `std::error::Error` in `std` feature
  • Loading branch information
franziskuskiefer authored Jan 16, 2025
2 parents 2793b97 + 88c0f55 commit 61e0b9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ libcrux uses the following configurations for its hardware abstractions
- **simd256** assumes 256 bit SIMD instructions on the platform
This implies AVX and AVX2 on x64 CPUs.

## Minimum Supported Rust Version (MSRV)

The default feature set has a MSRV of `1.78.0`. `no_std` environments
are supported starting from Rust version `1.81.0`.

## Randomness

libcrux provides a DRBG implementation that can be used standalone (`drbg::Drbg`)
Expand Down
4 changes: 4 additions & 0 deletions src/drbg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ impl fmt::Display for Error {
}
}

#[cfg(feature = "std")]
impl std::error::Error for Error {}

#[cfg(not(feature = "std"))]
impl core::error::Error for Error {}

pub struct Drbg {
Expand Down

0 comments on commit 61e0b9c

Please sign in to comment.