4 releases

Uses new Rust 2024

new 0.1.4 Mar 11, 2026
0.1.2 Mar 10, 2026
0.1.1 Feb 3, 2026
0.1.0 Feb 3, 2026

#731 in Cryptography

Download history 43/week @ 2026-01-29 187/week @ 2026-02-05 20/week @ 2026-02-12 64/week @ 2026-02-26

281 downloads per month

Apache-2.0

200KB
4K SLoC

C 2.5K SLoC // 0.2% comments Rust 1.5K SLoC // 0.1% comments

rust-dice

notice

rust-dice中的get_rand函数依赖于各平台的实现,需要各平台独立实现get_rand函数并引入。

rust-dice中提供一个弱引用的get_rand的default函数,在不同平台上,请再次依据平台实现get_rand函数。

A note about licensing

This crate is based on the upstream open-dice repository (https://android.googlesource.com/platform/external/open-dice/).

build

cargo build
cargo build --target aarch64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl
cargo build --no-default-features --features std --target aarch64-unknown-linux-musl
cargo build --features nostd --target aarch64-unknown-linux-musl

Dependencies

~12MB
~254K SLoC