Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
[workspace.package]
edition = "2018"
rust-version = "1.70"

[package]
name = "num-prime"
version = "0.5.0"
edition.workspace = true
rust-version.workspace = true
repository = "https://github.com/uutils/num-prime"
keywords = ["mathematics", "primes", "number-theory", "bigint", "num"]
categories = ["cryptography", "science", "algorithms"]
documentation = "https://docs.rs/num-prime"
license = "Apache-2.0"
description = """
Generic and optimized primality test, factorization and various number theoretic functions with arbitrary precision based on `num`.
"""
documentation = "https://docs.rs/num-prime"
readme = "README.md"
repository = "https://github.com/uutils/num-prime"
license = "Apache-2.0"
keywords = ["bigint", "mathematics", "num", "number-theory", "primes"]
categories = ["algorithms", "cryptography", "science"]

[package.metadata.docs.rs]
all-features = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[workspace]
members = [
"bench",
]

[workspace.package]
edition = "2018"
rust-version = "1.70"

[dependencies]
bitvec = "1.0.0"
either = "1.6.1"
lru = "0.16.3"
num-integer = "0.1.44"
num-traits = "0.2.14"
num-modular = "0.6.1"
bitvec = "1.0.0"
num-traits = "0.2.14"
rand = "0.8.6"
lru = "0.16.3"
either = "1.6.1"

[dependencies.num-bigint]
optional = true
version = "0.4.6"
features = ["rand"]
optional = true

[features]
default = ['big-table', 'big-int']
big-table = []
default = ["big-int", "big-table"]
# TODO: use the new cargo feature to override the num-bigint option
big-int = ['num-bigint', 'num-modular/num-bigint', 'num-modular/num-traits', 'num-modular/num-integer']
big-int = [
"num-bigint",
"num-modular/num-bigint",
"num-modular/num-integer",
"num-modular/num-traits"
]
big-table = []

[profile.release]
lto = "fat"
codegen-units = 1
panic = "abort"

[workspace]
members = [
"bench",
]

[package.metadata.docs.rs]
all-features = true
codegen-units = 1
6 changes: 3 additions & 3 deletions bench/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "num-prime-bench"
version = "0.0.0"
publish = false
edition.workspace = true
rust-version.workspace = true
publish = false

[[bench]]
name = "bench"
harness = false
name = "bench"

[dependencies]
num-primes = { version = "0.3.0", optional = true }

[dev-dependencies]
criterion = { version = "5.0.0", package = "codspeed-criterion-compat" }
criterion = { package = "codspeed-criterion-compat", version = "5.0.0" }
glass_pumpkin = "1.2.0"
num-bigint = { version = "0.4", features = ["rand"] }
num-prime = { path = "..", features = ["big-int"] }
Expand Down