-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCargo.toml
More file actions
105 lines (87 loc) · 3.03 KB
/
Copy pathCargo.toml
File metadata and controls
105 lines (87 loc) · 3.03 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[package]
name = "crypto-primitives"
publish = false
version.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
# Internal
crypto-primitives-proc-macros = { workspace = true }
# Core
num-traits = { workspace = true }
pastey = "0"
thiserror = "2"
# Wrapped crates
crypto-bigint = { version = ">= 0.7.1, < 0.8", default-features = false, optional = true }
ark-std = { version = "0.5", default-features = false, optional = true }
ark-ff = { version = "0.5", default-features = false, optional = true }
ark-serialize = { version = "0.5", default-features = false, optional = true }
num-bigint = { version = "0.4", default-features = false, optional = true }
# Optional utility for which implementations are provided
rand = { workspace = true, optional = true }
rayon = { version = "1", optional = true }
serde = { version = "1", default-features = false, optional = true }
zeroize = { version = "1", features = ["derive"], optional = true }
zerocopy = { version = "0.8", default-features = false, optional = true }
zerocopy-derive = { version = "0.8", default-features = false, optional = true }
[dev-dependencies]
crypto-primitives = { workspace = true, features = ["crypto_bigint"] }
criterion = { workspace = true }
proptest = { workspace = true }
rand = { workspace = true, features = ["std_rng"] }
[features]
default = ["std"]
parallel = ["dep:rayon"]
rand = ["dep:rand", "crypto-bigint/rand_core"]
serde = ["dep:serde", "crypto-bigint/serde"]
zeroize = ["dep:zeroize", "crypto-bigint/zeroize"]
zerocopy = ["dep:zerocopy", "dep:zerocopy-derive"]
std = ["num-traits/std", "ark-std/std", "ark-ff/std", "serde/std", "rand/std", "zeroize/std", "zerocopy/std"]
ark_std = ["dep:ark-std"]
ark_ff = ["ark_std", "num_bigint", "zeroize", "dep:ark-ff", "dep:ark-serialize"]
crypto_bigint = ["dep:crypto-bigint", "crypto-bigint/alloc"]
num_bigint = ["dep:num-bigint"]
[[bench]]
name = "boxed_monty_field_benches"
harness = false
[[bench]]
name = "const_monty_field_benches"
harness = false
[[bench]]
name = "monty_field_benches"
harness = false
#
# Workspace configuration
#
[workspace]
members = ["proc-macros"]
resolver = "3"
[workspace.package]
version = "0.1.0"
edition = "2024"
repository = "https://github.com/NethermindEth/crypto-primitives"
license = "Apache-2.0"
publish = false
[workspace.dependencies]
crypto-primitives = { path = "." }
crypto-primitives-proc-macros = { path = "proc-macros" }
num-traits = { version = "0.2", default-features = false }
proptest = { version = "1", default-features = false, features = ["alloc"] }
rand = { version = "0.10", default-features = false }
criterion = "0.7.0"
[workspace.lints.rust]
missing_docs = "allow" # FIXME
unsafe_code = "allow" # We do use unsafe code for performance reasons
[workspace.lints.clippy]
arithmetic_side_effects = "deny"
cast_lossless = "deny"
cast_possible_truncation = "deny"
cast_possible_wrap = "deny"
cast_precision_loss = "deny"
cast_sign_loss = "deny"
needless_return = "deny"
panicking_overflow_checks = "deny"
unwrap_used = "deny"