-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathCargo.toml
More file actions
253 lines (224 loc) · 7.7 KB
/
Cargo.toml
File metadata and controls
253 lines (224 loc) · 7.7 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
[package]
name = "ruint"
description = "Unsigned integer type with const-generic bit length"
version = "1.18.0"
keywords = ["uint"]
categories = ["mathematics"]
include = [".cargo/", "src/", "README.md"]
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
"--html-in-header",
".cargo/katex-header.html",
]
[workspace]
members = [".", "ruint-macro", "ruint-bench"]
resolver = "2"
[workspace.package]
edition = "2024"
rust-version = "1.90"
authors = ["Remco Bloemen <remco@wicked.ventures>"]
license = "MIT"
homepage = "https://github.com/recmo/uint"
repository = "https://github.com/recmo/uint"
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
missing-inline-in-public-items = "warn"
std-instead-of-alloc = "warn"
std-instead-of-core = "warn"
doc-markdown = "allow" # Unfortunately many false positives on Latex.
inline-always = "allow"
module-name-repetitions = "allow"
redundant-pub-crate = "allow"
unreadable-literal = "allow"
let-unit-value = "allow"
option-if-let-else = "allow"
cast-sign-loss = "allow"
cast-lossless = "allow"
[workspace.lints.rust]
missing-copy-implementations = "warn"
missing-debug-implementations = "warn"
missing-docs = "warn"
rust-2018-idioms = "warn"
unreachable-pub = "warn"
unused-must-use = "warn"
redundant-lifetimes = "warn"
unnameable-types = "warn"
[workspace.lints.rustdoc]
all = "warn"
[dependencies]
ruint-macro = { version = "1.2.1", path = "ruint-macro" }
thiserror = { version = "2.0", optional = true }
# support
alloy-rlp = { version = "0.3", optional = true, default-features = false }
arbitrary = { version = "1", optional = true, default-features = false }
ark-ff-03 = { version = "0.3.0", package = "ark-ff", optional = true, default-features = false }
ark-ff-04 = { version = "0.4.0", package = "ark-ff", optional = true, default-features = false }
ark-ff-05 = { version = "0.5.0", package = "ark-ff", optional = true, default-features = false }
bigdecimal = { version = "0.4", optional = true, default-features = false }
bincode-2 = { version = "2", package = "bincode", optional = true, default-features = false }
bn-rs = { version = "0.2", optional = true, default-features = true }
fastrlp-03 = { version = "0.3", package = "fastrlp", optional = true, default-features = false, features = [
"alloc",
] }
fastrlp-04 = { version = "0.4", package = "fastrlp", optional = true, default-features = false, features = [
"alloc",
] }
num-bigint = { version = "0.4", optional = true, default-features = false }
num-integer = { version = "0.1", optional = true, default-features = false }
num-traits = { version = "0.2.16", optional = true, default-features = false }
parity-scale-codec = { version = "3", optional = true, default-features = false, features = [
"derive",
"max-encoded-len",
] }
primitive-types = { version = "0.12", optional = true, default-features = false }
proptest = { version = "1", optional = true, default-features = false, features = [
"no_std",
] }
pyo3 = { version = "0.25", optional = true, default-features = false }
quickcheck = { version = "1", optional = true, default-features = false }
rand-08 = { version = "0.8", package = "rand", optional = true, default-features = false }
rand-09 = { version = "0.9", package = "rand", optional = true, default-features = false }
rkyv = { version = "0.8", optional = true }
rlp = { version = "0.5", optional = true, default-features = false }
serde_core = { version = "1.0.211", optional = true, default-features = false }
valuable = { version = "0.1", optional = true, default-features = false }
zeroize = { version = "1.6", optional = true, default-features = false }
bytemuck = { version = "1.13.1", optional = true, default-features = false }
ethereum_ssz = { version = "0.5.3", optional = true, default-features = false }
der = { version = "0.7", optional = true, default-features = false, features = [
"alloc",
] }
subtle = { version = "2.6.1", optional = true, default-features = false }
# postgres
bytes = { version = "1.4", optional = true }
postgres-types = { version = "0.2", optional = true }
# diesel
diesel = { version = "2.2", optional = true }
# sqlx
sqlx-core = { version = "0.8.2", optional = true }
# borsh
borsh = { version = "1.5", optional = true, default-features = false }
[dev-dependencies]
ruint = { path = ".", features = ["arbitrary", "proptest"] }
ark-bn254-03 = { version = "0.3.0", package = "ark-bn254" }
ark-bn254-04 = { version = "0.4.0", package = "ark-bn254" }
ark-bn254-05 = { version = "0.5.0", package = "ark-bn254" }
rand-09 = { version = "0.9", package = "rand" }
approx = "0.5"
bincode = "1.3"
hex = "0.4"
hex-literal = "1.0"
postgres = "0.19"
proptest = "1"
serde_json = "1.0"
# borsh
borsh = { version = "1.5", features = ["derive"] }
# benches only; we still need to include these here to make rust-analyzer work
arrayvec = "0.7"
criterion = { version = "4.3", package = "codspeed-criterion-compat" }
[features]
default = ["std"]
std = [
"alloc",
"alloy-rlp?/std",
"ark-ff-03?/std",
"ark-ff-04?/std",
"ark-ff-05?/std",
"bytes?/std",
"fastrlp-03?/std",
"fastrlp-04?/std",
"num-bigint?/std",
"num-integer?/std",
"num-traits?/std",
"parity-scale-codec?/std",
"primitive-types?/std",
"proptest?/std",
"rand-08?/std",
"rand-08?/std_rng",
"rand-09?/std",
"rand-09?/thread_rng",
"rlp?/std",
"serde_core?/std",
"valuable?/std",
"zeroize?/std",
]
alloc = [
"proptest?/alloc",
"rand-08?/alloc",
"rand-09?/alloc",
"serde_core?/alloc",
"valuable?/alloc",
"zeroize?/alloc",
]
# nightly-only features
nightly = []
generic_const_exprs = ["nightly"]
# support
alloy-rlp = ["dep:alloy-rlp", "alloc"]
arbitrary = ["dep:arbitrary", "std"]
ark-ff = ["dep:ark-ff-03"]
ark-ff-04 = ["dep:ark-ff-04"]
ark-ff-05 = ["dep:ark-ff-05"]
bigdecimal = ["dep:bigdecimal", "num-bigint"]
bincode-2 = ["dep:bincode-2"]
bn-rs = ["dep:bn-rs", "std"]
borsh = ["dep:borsh"]
bytemuck = ["dep:bytemuck"]
der = ["dep:der", "alloc"] # TODO: also have alloc free der impls.
diesel = ["dep:diesel", "std", "dep:thiserror"]
fastrlp = ["dep:fastrlp-03", "alloc"]
fastrlp-04 = ["dep:fastrlp-04", "alloc"]
num-bigint = ["dep:num-bigint", "alloc"]
num-integer = ["dep:num-integer", "num-traits", "alloc"]
num-traits = ["dep:num-traits", "alloc"]
parity-scale-codec = ["dep:parity-scale-codec", "alloc"]
postgres = ["dep:postgres-types", "dep:bytes", "dep:thiserror", "std"]
primitive-types = ["dep:primitive-types"]
proptest = ["dep:proptest", "alloc"]
pyo3 = ["dep:pyo3", "std"]
quickcheck = ["dep:quickcheck", "std"]
rand = ["dep:rand-08"]
rand-09 = ["dep:rand-09"]
rkyv = ["dep:rkyv", "alloc"]
rlp = ["dep:rlp", "alloc"]
serde = ["dep:serde_core", "alloc"] # TODO: try to avoid alloc in serde impls
sqlx = ["dep:sqlx-core", "std", "dep:thiserror"]
ssz = ["dep:ethereum_ssz", "std"]
subtle = ["dep:subtle"]
valuable = ["dep:valuable"]
zeroize = ["dep:zeroize"]
[profile.release]
opt-level = 3
lto = "thin"
debug = false
strip = "debuginfo" # "symbols" for less binary size but no backtraces
panic = "abort"
codegen-units = 16
# Use the `--profile profiling` flag to show symbols in release mode.
# e.g. `cargo build --profile profiling`
[profile.profiling]
inherits = "release"
debug = true
strip = false
[profile.bench]
inherits = "profiling"
# Looks like there is no way to completely disable cargo's automatic bench/test/etc. finding.
[lib]
bench = false
[[bench]]
name = "bench"
harness = false
path = "benches/bench.rs"
# required-features = ["run_with_-p_ruint-bench"]