Skip to content

Commit 23d4bfe

Browse files
committed
Added x86_64-unknown-hermit support
1 parent 0d0404b commit 23d4bfe

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
- Added x86_64-unknown-hermit support [#236]
9+
10+
[#236]: https://github.com/rust-random/getrandom/pull/236
11+
712
## [0.2.3] - 2021-04-10
813
### Changed
914
- Replace build.rs with link attributes. [#205]

src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
//! | Fuchsia OS | `*‑fuchsia` | [`cprng_draw`][11]
2525
//! | Redox | `*‑redox` | [`/dev/urandom`][12]
2626
//! | Haiku | `*‑haiku` | `/dev/random` (identical to `/dev/urandom`)
27+
//! | Hermit | `x86_64-*-hermit` | [`RDRAND`][18]
2728
//! | SGX | `x86_64‑*‑sgx` | [RDRAND][18]
2829
//! | VxWorks | `*‑wrs‑vxworks‑*` | `randABytes` after checking entropy pool initialization with `randSecure`
2930
//! | Emscripten | `*‑emscripten` | `/dev/random` (identical to `/dev/urandom`)
@@ -200,6 +201,8 @@ cfg_if! {
200201
#[path = "openbsd.rs"] mod imp;
201202
} else if #[cfg(target_os = "wasi")] {
202203
#[path = "wasi.rs"] mod imp;
204+
} else if #[cfg(all(target_arch = "x86_64", target_os = "hermit"))] {
205+
#[path = "rdrand.rs"] mod imp;
203206
} else if #[cfg(target_os = "vxworks")] {
204207
mod util_libc;
205208
#[path = "vxworks.rs"] mod imp;

0 commit comments

Comments
 (0)