Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
81ed0d7
feat: Add support for Aarch64
Pr0methean Apr 22, 2026
4272d8a
Fix: add asm import on aarch64
Pr0methean Apr 22, 2026
ee9fbae
Fix: remove duplicate definitions
Pr0methean Apr 22, 2026
377c7e1
Fix: remove duplicate definitions of `new`
Pr0methean Apr 22, 2026
d357b74
Add debug logging to diagnose failure
Pr0methean Apr 22, 2026
d783539
Fix: MRS is a privileged instruction, so use platform APIs instead wh…
Pr0methean Apr 22, 2026
7d4b155
Fix: need to explicitly use `target_os = ""`
Pr0methean Apr 23, 2026
b3b5e2e
Fix: replace std:: imports with core::
Pr0methean Apr 23, 2026
789b6ea
Fix: imports and unsafe blocks for rdrand detection
Pr0methean Apr 23, 2026
82c9b99
Fix: Rust 2024 requires "unsafe extern"
Pr0methean Apr 23, 2026
79dd914
Narrow scope of unsafe blocks
Pr0methean Apr 23, 2026
8008316
Fix: cfg syntax in Cargo.toml
Pr0methean Apr 23, 2026
d4e9fc5
Fix: use emulated instruction on Linux
Pr0methean Apr 23, 2026
dcf3f69
Fix: incorrect detection on Windows/Aarch64
Pr0methean Apr 23, 2026
7315ece
Update comments
Pr0methean Apr 23, 2026
e2b4bc6
Update comments
Pr0methean Apr 23, 2026
9632fdf
Gemini says we can use MRS on FreeBSD and NetBSD, instead of untested…
Pr0methean Apr 23, 2026
361984d
cargo fmt
Pr0methean Apr 23, 2026
22b13ee
Clarify comment
Pr0methean Apr 23, 2026
1734ac8
Add back std feature and use `arch::is_aarch64_feature_detected!("ran…
Pr0methean Apr 23, 2026
87ee646
Fix typo
Pr0methean Apr 23, 2026
86f19ab
Use std::arch::is_aarch64_feature_detected rather than untested platf…
Pr0methean Apr 23, 2026
22fb97b
Update .github/workflows/rdrand.yml
Pr0methean Apr 29, 2026
998f21e
Update src/lib.rs
Pr0methean Apr 29, 2026
bb37167
Clarify comment
Pr0methean Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions .github/workflows/rdrand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ on:
types: [opened, reopened, synchronize]

jobs:
test:
test_x86:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust_toolchain: [nightly, stable, 1.86.0]
os: [ubuntu-latest, windows-latest, macOS-latest]
flags: ["", "--no-default-features", "--release", "--release --no-default-features"]
os: [ubuntu-latest, windows-latest, macos-26-intel]
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
Expand All @@ -28,11 +27,46 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=Cargo.toml ${{ matrix.flags }} -- --nocapture

bench:
args: --manifest-path=Cargo.toml -- --nocapture
test_aarch64:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04-arm, windows-11-arm, macOS-latest]
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
default: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=Cargo.toml -- --nocapture
test_cross:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: zijiren233/cargo-cross@v1.4.2
Comment thread
Pr0methean marked this conversation as resolved.
Outdated
with:
command: test
toolchain: nightly
targets: |
aarch64-unknown-linux-gnu
env:
QEMU_CPU: 'max' # Ensures the emulated CPU has FEAT_RNG
RUSTFLAGS: '-C target-feature=+rand'
bench:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, ubuntu-24.04-arm, macos-26-intel, macos-latest, windows-latest, windows-11-arm ]
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ harness = false
[dependencies]
rand_core = { version = "0.10", default-features = false }
Comment thread
Pr0methean marked this conversation as resolved.

[features]
std = []

[target.'cfg(target_os = "openbsd")'.dependencies]
libc = "0.2.185"

[dev-dependencies]
criterion = "0.8"
rand = "0.10.0"
Loading
Loading