docs.rs failed to build rng-pack-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
rng-pack-0.3.0
RNG Pack
A collection of pseudo-random number generators (PRNGs) implemented in Rust.
This crate provides efficient implementations of various random number generation algorithms, supporting both Rust and C (via FFI).
Supported Generators
- Mersenne Twister:
mt19937::Mt19937(32-bit)mt1993764::Mt1993764(64-bit)
- PCG:
pcg32::Pcg32(Permuted Congruential Generator, PCG-XSH-RR)
- Philox (Counter-based RNGs):
philox32::Philox32(4x32)philox64::Philox64(2x64)
- Twisted GFSR:
twisted_gfsr::TwistedGFSR
- Xorshift:
xorshift32::Xorshift32xorshift64::Xorshift64xorshift128::Xorshift128
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Usage Examples
Basic Usage (Mersenne Twister)
use Mt19937;
Using Philox (Counter-based)
Philox generators produce blocks of random numbers and are suitable for parallel applications.
use Philox32;
C API
This crate exports C-compatible functions for all generators, allowing them to be used as a shared library.
Each generator exposes functions for:
- Creation (
_new) - Destruction (
_free) - Bulk generation (
_next_uXXs,_next_fXXs) - Range generation (
_rand_iXXs,_rand_fXXs)
Example signature for MT19937:
void* ;
void ;
void ;