-
Notifications
You must be signed in to change notification settings - Fork 74
/
Cargo.toml
144 lines (130 loc) · 6.07 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
[package]
name = "smoldot"
version = "0.5.0"
authors = ["Parity Technologies <[email protected]>", "Pierre Krieger <[email protected]>"]
description = "Primitives to build a client for Substrate-based blockchains"
repository = "https://github.com/paritytech/smoldot"
documentation = "https://docs.rs/smoldot"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
edition = "2021"
readme = "README.md"
keywords = ["blockchain", "peer-to-peer"]
exclude = [".github", "bin"] # TODO: we might need to reorganize the repo to avoid including unwanted files
[workspace]
default-members = [".", "bin/full-node"]
members = [
".",
"bin/full-node",
"bin/light-base",
"bin/wasm-node/rust",
]
[features]
default = ["database-sqlite", "std"]
database-sqlite = [
"parking_lot",
"sqlite",
"std" # A database stored on the filesystem can't reasonably work without a filesystem.
]
std = [
"anyhow",
"async-std",
"futures/thread-pool",
"pin-project",
"schnorrkel/getrandom", # TODO: necessary for signing; clarify in docs and in source code
"soketto",
"wasmtime",
]
[dependencies]
# This section contains only no_std-compatible crates. See below for std-only crates.
#
# Before adding a crate here, please make sure that it is `no_std`-compatible. If a crate should
# theoretically be `no_std`-compatible (i.e. doesn't need the help of the operating system) but is
# not, or if things are sketchy, please leave a comment next to it.
arrayvec = { version = "0.7.2", default-features = false }
atomic = { version = "0.5.1", default-features = false }
base64 = { version = "0.13.1", default-features = false, features = ["alloc"] }
bip39 = { version = "1.0.1", default-features = false }
blake2-rfc = { version = "0.2.18", default-features = false }
bs58 = { version = "0.4.0", default-features = false, features = ["alloc"] }
crossbeam-queue = { version = "0.3.8", default-features = false, features = ["alloc"] }
derive_more = "0.99.17"
ed25519-zebra = { version = "3.1.0", default-features = false }
either = { version = "1.8.0", default-features = false }
event-listener = { version = "2.5.3" } # TODO: no-std-ize
fnv = { version = "1.0.7", default-features = false }
futures = "0.3.25" # TODO: no-std-ize
hashbrown = { version = "0.13.1", default-features = false, features = ["serde"] } # TODO: remove serde feature
hex = { version = "0.4.3", default-features = false }
hmac = { version = "0.12.1", default-features = false }
itertools = { version = "0.10.5", default-features = false }
libsecp256k1 = { version = "0.7.1", default-features = false, features = ["static-context", "hmac"] }
# Reminder: `log` is forbidden
merlin = { version = "3.0", default-features = false }
nom = { version = "7.1.1", default-features = false, features = ["alloc"] }
no-std-net = { version = "0.6.0", default-features = false }
num-bigint = { version = "0.4.3", default-features = false }
num-rational = { version = "0.4.1", default-features = false, features = ["num-bigint"] }
num-traits = { version = "0.2.15", default-features = false }
pbkdf2 = { version = "0.11.0", default-features = false }
rand = { version = "0.8.5", default-features = false, features = ["std", "std_rng"] } # TODO: rand is used in hack-y ways at the moment ; these features should be removed
rand_chacha = { version = "0.3.1", default-features = false }
ruzstd = { version = "0.3.0" } # TODO: doesn't support no_std :-/
schnorrkel = { version = "0.10.2", default-features = false, features = ["preaudit_deprecated", "u64_backend"] }
serde = { version = "1.0.148", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0.89", default-features = false, features = ["alloc", "raw_value"] }
sha2 = { version = "0.10.6", default-features = false }
siphasher = { version = "0.3.10", default-features = false }
slab = { version = "0.4.7", default-features = false }
smallvec = "1.10.0"
snow = { version = "0.9.0", default-features = false, features = ["default-resolver"] }
tiny-keccak = { version = "2.0", features = ["keccak"] }
twox-hash = { version = "1.6.3", default-features = false }
wasmi = { version = "0.9.1", default-features = false, features = ["core"] } # TODO: having to add `core` is sketchy; maybe report this
# `database-sqlite` feature
sqlite = { version = "0.27.3", optional = true, default-features = false, features = ["linkage"] }
# `std` feature
# Add here the crates that cannot function without the help of the operating system or environment.
async-std = { version = "1.12.0", optional = true }
parking_lot = { version = "0.12.1", optional = true }
pin-project = { version = "1.0.12", optional = true }
soketto = { version = "0.7.1", optional = true }
# BELOW: DEPENDENCIES TO REMOVE
# TODO:
parity-scale-codec = { version = "3.2.1", features = ["derive"], default-features = false } # TODO: a lot of unnecessary overhead in terms of memory allocations
[target.'cfg(target_arch = "x86_64")'.dependencies]
# `std` feature
anyhow = { version = "1.0.66", default-features = false, features = ["std"], optional = true } # Used only in order to interact with wasmtime
wasmtime = { version = "3.0.0", default-features = false, features = ["async", "cranelift"], optional = true }
[dev-dependencies]
async-std = "1.12.0"
criterion = "0.4.0"
tempfile = "3.3.0"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[profile.dev]
debug = 1 # Default value is `2`, which contains the full debug info. `1` is enough for stack traces.
opt-level = 2
panic = "abort"
[profile.dev.package."*"]
opt-level = 3
# The `test` profile mimics the `dev` profile to avoid recompilations.
[profile.test]
opt-level = 2
[profile.test.package."*"]
opt-level = 3
[profile.release]
panic = "abort"
lto = true
# codegen-units set to 1 to avoid performance regressions when combined with LTO
# See https://github.com/rust-lang/rust/issues/47745
# https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
codegen-units = 1
incremental = false
#strip = "symbols" # TODO: uncomment once stable
[profile.min-size-release]
inherits = "release"
opt-level = "z"
incremental = false
[[bench]]
name = "header"
harness = false