Random (VRD) logo

Random (VRD)

A Rust library for generating high-quality random numbers based on the Mersenne Twister algorithm.

Part of the Mini Functions family of libraries.

Random (VRD) Banner

Made With Rust Crates.io Lib.rs Docs.rs License Codecov

WebsiteDocumentationReport BugRequest FeatureContributing Guidelines

divider

Overview 📖

Random (VRD) is a Rust library for generating high-quality random numbers based on the Mersenne Twister algorithm.

The Mersenne Twister is a pseudorandom number generator (PRNG) that is often used in computer simulations and games. It is a fast and reliable PRNG.

The Random (VRD) is used to generate random numbers using the Mersenne Twister algorithm. It generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) starting from any odd seed in 0..(2^32 - 1).

The index is incremented after each random number is generated. When the index reaches 624, the array is reinitialized and the index is reset to 0.

Features ✨

Getting Started 🚀

It takes just a few minutes to get up and running with Random (VRD).

Installation

To install Random (VRD), you need to have the Rust toolchain installed on your machine. You can install the Rust toolchain by following the instructions on the Rust website.

Once you have the Rust toolchain installed, you can install Random (VRD) using the following command:

shell cargo install vrd

You can then run the help command to see the available options:

shell vrd --help

Requirements

The minimum supported Rust toolchain version is currently Rust 1.69.0 or later (stable). It is recommended that you install the latest stable version of Rust.

Platform support

Random (VRD) is supported and tested on the following platforms:

Tier 1 platforms 🏆

| Operating System | Target | Description | | --- | --- | --- | | Linux | aarch64-unknown-linux-gnu | 64-bit Linux systems on ARM architecture | | Linux | i686-unknown-linux-gnu | 32-bit Linux (kernel 3.2+, glibc 2.17+) | | Linux | x8664-unknown-linux-gnu | 64-bit Linux (kernel 2.6.32+, glibc 2.11+) | | macOS | x8664-apple-darwin | 64-bit macOS (10.7 Lion or later) | | Windows | i686-pc-windows-gnu | 32-bit Windows (7 or later) | | Windows | i686-pc-windows-msvc | 32-bit Windows (7 or later) | | Windows | x8664-pc-windows-gnu | 64-bit Windows (7 or later) | | Windows | x8664-pc-windows-msvc | 64-bit Windows (7 or later) |

Tier 2 platforms 🥈

| Operating System | Target | Description | | --- | --- | --- | | 64-bit Linux | x8664-unknown-linux-musl | 64-bit Linux (kernel 2.6.32+, musl libc) | | ARM64 Linux | aarch64-unknown-linux-musl | 64-bit Linux systems on ARM architecture | | ARM64 macOS | aarch64-apple-darwin | 64-bit macOS on Apple Silicon | | ARM64 Windows | aarch64-pc-windows-msvc | 64-bit Windows (aarch64-pc-windows-msvc) | | ARMv6 Linux | arm-unknown-linux-gnueabi | ARMv6 Linux (kernel 3.2, glibc 2.17) | | ARMv6 Linux, hardfloat | arm-unknown-linux-gnueabihf | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17) | | ARMv7 Linux, hardfloat | armv7-unknown-linux-gnueabihf | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17) | | FreeBSD | x8664-unknown-freebsd | 64-bit FreeBSD on x86-64 | | MIPS (LE) Linux | mipsel-unknown-linux-gnu | MIPSel Linux (kernel 2.6.32+, glibc 2.11+) | | MIPS Linux | mips-unknown-linux-gnu | MIPS Linux (kernel 2.6.32+, glibc 2.11+) | | MIPS64 (LE) Linux | mips64el-unknown-linux-gnuabi64 | MIPS64el Linux (kernel 2.6.32+, glibc 2.11+) | | MIPS64 Linux | mips64-unknown-linux-gnuabi64 | MIPS64 Linux (kernel 2.6.32+, glibc 2.11+) | | NetBSD | x86_64-unknown-netbsd | 64-bit NetBSD on x86-64 | | PowerPC Linux | powerpc-unknown-linux-gnu | PowerPC Linux (kernel 3.2, glibc 2.17) | | PPC64 Linux | powerpc64-unknown-linux-gnu | PowerPC64 Linux (kernel 3.2, glibc 2.17) | | PPC64LE Linux | powerpc64le-unknown-linux-gnu | PowerPC64le Linux (kernel 3.2, glibc 2.17) | | RISC-V Linux | riscv64gc-unknown-linux-gnu | RISC-V Linux (kernel 3.2, glibc 2.17) | | S390x Linux | s390x-unknown-linux-gnu | s390x Linux (kernel 3.2, glibc 2.17) |

The GitHub Actions shows the platforms in which the Random (VRD) library tests are run.

Documentation

ℹ️ Info: Please check out our website for more information. You can find our documentation on docs.rs, lib.rs and crates.io.

Usage 📖

To use the Random (VRD) library in your project, add the following to your Cargo.toml file:

toml [dependencies] vrd = "0.0.3"

Add the following to your main.rs file:

rust extern crate vrd; use vrd::*;

then you can use the functions in your application code.

Examples

To get started with Random (VRD), you can use the examples provided in the examples directory of the project.

To run the examples, clone the repository and run the following command in your terminal from the project root directory.

shell cargo run --example vrd

Semantic Versioning Policy 🚥

For transparency into our release cycle and in striving to maintain backward compatibility, Random (VRD) follows semantic versioning.

License 📝

The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0).

Contribution 🤝

We welcome all people who want to contribute. Please see the contributing instructions for more information.

Contributions in any form (issues, pull requests, etc.) to this project must adhere to the Rust's Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Acknowledgements 💙

A big thank you to all the awesome contributors of vrd for their help and support.

A special thank you goes to the Rust Reddit community for providing a lot of useful suggestions on how to improve this project.