-
Notifications
You must be signed in to change notification settings - Fork 648
/
Copy pathCargo.toml
127 lines (104 loc) · 3.11 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
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
[package]
name = "revm-precompile"
description = "Revm Precompiles - Ethereum compatible precompiled contracts"
version = "17.0.0-alpha.5"
authors.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
readme.workspace = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[lints.rust]
unreachable_pub = "warn"
unused_must_use = "deny"
rust_2018_idioms = "deny"
[lints.rustdoc]
all = "warn"
[dependencies]
# revm
primitives.workspace = true
context-interface.workspace = true
# static precompile sets.
once_cell = { workspace = true, features = ["alloc"] }
# ecRecover
k256 = { workspace = true, features = ["ecdsa"] }
secp256k1 = { workspace = true, features = [
"alloc",
"recovery",
"rand",
"global-context",
], optional = true }
libsecp256k1 = { workspace = true, features = [
"static-context",
], optional = true }
# SHA2-256 and RIPEMD-160
sha2.workspace = true
ripemd.workspace = true
# modexp
aurora-engine-modexp.workspace = true
# ecAdd, ecMul, ecPairing
bn.workspace = true
# KZG point evaluation precompile
c-kzg = { workspace = true, optional = true, features = [
"ethereum_kzg_settings",
] }
# Optionally use `kzg-rs` for a pure Rust implementation of KZG point evaluation.
kzg-rs = { workspace = true, optional = true }
# BLS12-381 precompiles
blst = { workspace = true, optional = true }
# p256verify precompile
p256 = { workspace = true, optional = true, features = ["ecdsa"] }
# utils
cfg-if.workspace = true
[dev-dependencies]
criterion.workspace = true
rand = { workspace = true, features = ["std"] }
eyre.workspace = true
rstest.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_derive.workspace = true
[features]
default = ["std", "c-kzg", "secp256k1", "portable", "blst"]
std = [
"primitives/std",
"k256/std",
"once_cell/std",
"ripemd/std",
"sha2/std",
"c-kzg?/std",
"secp256k1?/std",
"libsecp256k1?/std",
"aurora-engine-modexp/std",
"p256?/std",
"context-interface/std",
"serde/std",
"serde_json/std"
]
hashbrown = ["primitives/hashbrown"]
asm-keccak = ["primitives/asm-keccak"]
# Enables the p256verify precompile.
secp256r1 = ["dep:p256"]
# These libraries may not work on all no_std platforms as they depend on C.
# Enables the KZG point evaluation precompile.
c-kzg = ["dep:c-kzg"]
# `kzg-rs` is not audited but useful for `no_std` environment, use it with causing and default to `c-kzg` if possible.
kzg-rs = ["dep:kzg-rs"]
# Compile in portable mode, without ISA extensions.
# Binary can be executed on all systems.
portable = ["c-kzg?/portable", "blst?/portable"]
# Use `secp256k1` as a faster alternative to `k256`.
# The problem that `secp256k1` has is it fails to build for `wasm` target on Windows and Mac as it is c lib.
# In Linux it passes. If you don't require to build wasm on win/mac, it is safe to use it and it is enabled by default.
secp256k1 = ["dep:secp256k1"]
libsecp256k1 = ["dep:libsecp256k1"]
# Enables the BLS12-381 precompiles.
blst = ["dep:blst"]
[[bench]]
name = "bench"
path = "benches/bench.rs"
harness = false
required-features = ["secp256k1"]