forked from paritytech/smoldot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
115 lines (102 loc) · 4.76 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
[package]
name = "smoldot"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "Primitives to build a client for Substrate-based blockchains"
repository = "https://github.com/paritytech/smoldot"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
edition = "2018"
readme = "README.md"
keywords = ["blockchain", "peer-to-peer"]
[workspace]
default-members = [".", "bin/full-node"]
members = [
".",
"bin/full-node",
"bin/wasm-node/rust",
]
[features]
default = ["database-sled", "std"]
database-sled = [
"sled",
"std" # A database stored on the filesystem can't reasonably work without a filesystem.
]
std = [
"async-std",
"futures/thread-pool",
"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.
ahash = { version = "0.6.2", default-features = false }
arrayvec = { version = "0.5.2", default-features = false }
blake2-rfc = { version = "0.2.18", default-features = false }
bs58 = { version = "0.4.0", default-features = false, features = ["alloc"] }
derive_more = "0.99.13"
ed25519-zebra = { version = "2.2.0", default-features = false }
either = { version = "1.6.1", default-features = false }
fnv = { version = "1.0.7", default-features = false }
futures = "0.3.13" # TODO: no-std-ize
hashbrown = { version = "0.11.2", default-features = false, features = ["serde"] } # TODO: remove serde feature
hex = { version = "0.4.3", default-features = false }
libsecp256k1 = { version = "0.3.5", default-features = false }
# Reminder: `log` is forbidden
merlin = { version = "3.0", default-features = false }
multihash = "0.11.4" # TODO: waiting for a crates.io publication of https://github.com/multiformats/rust-multihash/pull/82 that adds no_std support
nom = { version = "6.1.2", default-features = false, features = ["alloc"] }
num-bigint = { version = "0.4.0", default-features = false }
num-rational = { version = "0.4.0", default-features = false, features = ["num-bigint"] }
num-traits = { version = "0.2.14", default-features = false }
parity-multiaddr = "0.9.6" # TODO: doesn't support no_std
pin-project = "1.0.6"
prost = { version = "0.7.0", default-features = false, features = ["prost-derive"] }
rand7 = { package = "rand", version = "0.7.3", default-features = false, features = ["std"] } # TODO: rand is used in hack-y ways at the moment ; these features should be removed
rand = { version = "0.8.3", 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.0", default-features = false }
schnorrkel = { version = "0.10.1", default-features = false, features = ["preaudit_deprecated", "u64_backend"] }
serde = { version = "1.0.125", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0.64", default-features = false, features = ["alloc", "raw_value"] }
sha2 = { version = "0.9.3", default-features = false }
slab = "0.4.2" # TODO: doesn't support no_std and is unmaintained :-/
smallvec = "1.6.1"
snow = { version = "0.7.2", default-features = false, features = ["default-resolver"] }
tiny-keccak = { version = "2.0", features = ["keccak"] }
twox-hash = "1.6.0"
wasmi = { version = "0.8.0", default-features = false, features = ["core"] } # TODO: having to add `core` is sketchy; maybe report this
# `database-sled` feature
sled = { version = "0.34.6", optional = true, features = ["compression"] }
# `std` feature
# Add here the crates that cannot function without the help of the operating system or environment.
async-std = { version = "1.9.0", optional = true }
soketto = { version = "0.4.2", optional = true }
# BELOW: DEPENDENCIES TO REMOVE
# TODO:
parity-scale-codec = { version = "2.0.1", features = ["derive"] } # TODO: a lot of unnecessary overhead in terms of memory allocations
[target.'cfg(target_arch = "x86_64")'.dependencies]
# `std` feature
wasmtime = { version = "0.25.0", default-features = false, features = ["async"], optional = true }
[build-dependencies]
prost-build = "0.7.0"
[dev-dependencies]
async-std = "1.9.0"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[profile.dev]
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
#strip = "symbols" # TODO: uncomment once stable