-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
48 lines (39 loc) · 2.06 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[package]
name = "const-primes"
authors = ["Johanna Sörngård <[email protected]>"]
version = "0.9.8"
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