forked from radixdlt/radixdlt-scrypto
/
Cargo.toml
104 lines (84 loc) · 4.9 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
[package]
name = "radix-engine"
version = "1.0.1"
edition = "2021"
[dependencies]
sbor = { path = "../sbor", default-features = false }
radix-engine-interface = { path = "../radix-engine-interface", default-features = false }
radix-engine-common = { path = "../radix-engine-common", default-features = false }
radix-engine-store-interface = { path = "../radix-engine-store-interface", default-features = false }
native-sdk = { path = "../native-sdk", default-features = false }
transaction = { path = "../transaction", default-features = false }
utils = { path = "../utils", default-features = false }
colored = { version = "2.0.0", default-features = false }
hex = { version = "0.4.3", default-features = false }
num-traits = { version = "0.2.15", default-features = false }
bitflags = { version = "1.3" }
lru = { version = "0.8.1", default-features = false, optional = true}
moka = { version = "0.9.9", features = ["sync"], default-features = false, optional = true }
strum = { version = "0.24", default-features = false, features = ["derive"] }
perfcnt = { version = "0.8.0", optional = true }
radix-engine-profiling = { path = "../radix-engine-profiling", optional = true, features = ["resource_tracker"] }
resources-tracker-macro = { path = "../radix-engine-profiling/resources-tracker-macro" }
paste = { version = "1.0.13" }
radix-engine-macros = { path = "../radix-engine-macros", default-features = false }
const-sha1 = { git = "https://github.com/radixdlt/const-sha1", default-features = false } # Chosen because of its small size and 0 transitive dependencies
# WASM validation
wasmparser = { version = "0.107.0", default-features = false }
syn = { git = "https://github.com/dtolnay/syn.git", tag = "1.0.93", features = ["full", "extra-traits"] }
# WASM instrumentation
wasm-instrument = { git = "https://github.com/radixdlt/wasm-instrument", branch = "radix-master", default-features = false, features = ["ignore_custom_section"]}
# WASM execution
# - Wasmi is a WASM interpreter that supports WebAssembly MVP
# - Wasmer is a WASM engine with multiple backends: `singlepass` (linear time), `LLVM` and `cranelift`
# TODO: use official wasmi package when the issue https://github.com/paritytech/wasmi/issues/631 is fixed
wasmi = { git = "https://github.com/radixdlt/wasmi.git", branch = "v0.23.0_store_clone" }
wasmer = { version = "2.2.1", optional = true }
wasmer-compiler-singlepass = { version = "2.2.1", optional = true }
serde_json = { version = "1.0.81", optional = true, default-features = false }
lazy_static = { version = "1.4.0" }
[dev-dependencies]
wabt = { version = "0.10.0" }
criterion = { version = "0.3", features = ["html_reports"] }
wasm-benchmarks-lib = { path = "./wasm-benchmarks-lib", default-features = false }
wasmer = { version = "2.2.1"}
wasmer-compiler-singlepass = { version = "2.2.1" }
[[bench]]
name = "wasm_benchmarks"
harness = false
[features]
# You should enable either `std` or `alloc`
default = ["std", "moka"]
std = ["sbor/std", "native-sdk/std", "wasmi/std", "transaction/std", "radix-engine-interface/std", "radix-engine-store-interface/std", "radix-engine-macros/std", "utils/std", "serde_json?/std", "wasm-instrument/std" ]
alloc = ["sbor/alloc", "native-sdk/alloc", "transaction/alloc", "radix-engine-interface/alloc", "radix-engine-store-interface/alloc", "radix-engine-macros/alloc", "utils/alloc", "lru?/hashbrown", "serde_json?/alloc"]
# Enables heap memory and CPU cycles resource tracing - available only for Linux OS on x86 arch.
# Requires CAP_PERFMON capability for the process (sudo setcap cap_perfmon=eip <exec_file>).
cpu_ram_metrics = ["std", "dep:perfcnt"]
# Use `wasmer` as WASM engine, otherwise `wasmi`
wasmer = ["dep:wasmer", "dep:wasmer-compiler-singlepass"]
# Two features for the two possible libraries to use for caching. Moka is not WASM friendly while LRU is. One of these
# two features must be enabled.
moka = ["dep:moka"]
lru = ["dep:lru"]
resource_tracker = ["dep:radix-engine-profiling", "resources-tracker-macro/resource_tracker", "radix-engine-common/resource_tracker"]
# System/Application Database Checker
db_checker = []
# This flag is set by fuzz-tests framework and it disables cache in wasm_instrumenter/wasmi/wasmer
# to prevent non-determinism when fuzzing
radix_engine_fuzzing = [
"radix-engine-common/radix_engine_fuzzing",
"radix-engine-interface/radix_engine_fuzzing",
"sbor/radix_engine_fuzzing",
"transaction/radix_engine_fuzzing",
"utils/radix_engine_fuzzing",
]
# This flag enables code parts used only for testing. Using "test" config option is not enough in cases,
# when external crate is used for tests (eg. radix-engine-tests)
radix_engine_tests = []
full_wasm_benchmarks = []
# This flag disables package size limit, memory size limit and fee limit
coverage = [ "radix-engine-common/coverage" ]
# Ref: https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
[lib]
doctest = false
bench = false