const-primes 0.9.7

Work with prime numbers in const contexts. Prime generation, primality testing, prime counting, and more.
Documentation
[package]

name = "const-primes"

authors = ["Johanna Sörngård <jsorngard@gmail.com>"]

version = "0.9.7"

edition = "2021"

license = "MIT OR Apache-2.0"

keywords = ["const", "primes", "no_std", "prime-numbers"]

categories = ["mathematics", "no-std", "no-std::no-alloc", "algorithms"]

description = "Work with prime numbers in const contexts. Prime generation, primality testing, prime counting, and more."

repository = "https://github.com/JSorngard/const-primes/"

documentation = "https://docs.rs/const-primes"

rust-version = "1.81.0"



[dependencies]

serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }

serde_arrays = { version = "0.1.0", optional = true }

zerocopy = { version = "0.8", default-features = false, features = ["derive"], optional = true }

rkyv = { version = "0.8", default-features = false, optional = true }

# no-std constant time primality testing, low memory variant

machine-prime = { version="1.3.*", features = ["small"], optional = true}



[dev-dependencies]

criterion = { version = "0.5", features = ["html_reports"] }

rand = { version = "0.8", default-features = false, features = ["small_rng"] }

serde_json = "1.0"



[features]

# Derives the `Serialize` and `Deserialize` traits from the [`serde`](https://crates.io/crates/serde) crate for the `Primes` struct, as well as a few others.

# Uses the [`serde_arrays`](https://crates.io/crates/serde_arrays) crate to do this, and that crate uses the standard library.

serde = ["dep:serde", "dep:serde_arrays"]



# Derives the `IntoBytes` trait from the [`zerocopy`](https://crates.io/crates/zerocopy) crate for the `Primes` struct.

zerocopy = ["dep:zerocopy"]



# Derives the `Serialize`, `Deserialize`, and `Archive` traits from the [`rkyv`](https://crates.io/crates/rkyv) crate for the `Primes` struct.

rkyv = ["dep:rkyv"]



# Speeds up primality testing significantly by using the [`machine-prime`](https://crates.io/crates/machine-prime) crate.

fast_test = ["dep:machine-prime"]





[package.metadata.docs.rs]

# Document all features.

all-features = true



[[bench]]

name = "prime_benches"

harness = false