Correct std feature-flagging

If a crate has std set, it should enable std for all dependencies in order to
let them properly select which algorithms to use. Some crates fallback to
slower/worse algorithms on no-std.

Also more aggressively sets default-features = false leading to a *10%*
reduction in the amount of crates coordinator builds.
This commit is contained in:
Luke Parker 2023-10-31 07:41:23 -04:00
parent 34bcb9eb01
commit 05dc474cb3
No known key found for this signature in database
19 changed files with 185 additions and 135 deletions

13
Cargo.lock generated
View file

@ -644,6 +644,15 @@ dependencies = [
"generic-array 0.14.7", "generic-array 0.14.7",
] ]
[[package]]
name = "block-padding"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
dependencies = [
"generic-array 0.14.7",
]
[[package]] [[package]]
name = "bls12_381" name = "bls12_381"
version = "0.8.0" version = "0.8.0"
@ -3633,6 +3642,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
dependencies = [ dependencies = [
"block-padding",
"generic-array 0.14.7", "generic-array 0.14.7",
] ]
@ -9526,9 +9536,6 @@ name = "spin"
version = "0.9.8" version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
dependencies = [
"lock_api",
]
[[package]] [[package]]
name = "spki" name = "spki"

View file

@ -10,7 +10,7 @@ edition = "2021"
[dependencies] [dependencies]
std-shims = { version = "0.1.1", path = "../../common/std-shims", default-features = false } std-shims = { version = "0.1.1", path = "../../common/std-shims", default-features = false }
thiserror = { version = "1", optional = true } thiserror = { version = "1", default-features = false, optional = true }
zeroize = { version = "^1.5", default-features = false } zeroize = { version = "^1.5", default-features = false }
rand_core = { version = "0.6", default-features = false } rand_core = { version = "0.6", default-features = false }
@ -22,18 +22,18 @@ bitcoin = { version = "0.31", default-features = false, features = ["no-std"] }
k256 = { version = "^0.13.1", default-features = false, features = ["arithmetic", "bits"] } k256 = { version = "^0.13.1", default-features = false, features = ["arithmetic", "bits"] }
transcript = { package = "flexible-transcript", path = "../../crypto/transcript", version = "0.3", features = ["recommended"], optional = true } transcript = { package = "flexible-transcript", path = "../../crypto/transcript", version = "0.3", default-features = false, features = ["recommended"], optional = true }
frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.8", features = ["secp256k1"], optional = true } frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.8", default-features = false, features = ["secp256k1"], optional = true }
hex = { version = "0.4", optional = true } hex = { version = "0.4", default-features = false, optional = true }
serde = { version = "1", features = ["derive"], optional = true } serde = { version = "1", default-features = false, features = ["derive"], optional = true }
serde_json = { version = "1", optional = true } serde_json = { version = "1", default-features = false, optional = true }
reqwest = { version = "0.11", features = ["json"], optional = true } reqwest = { version = "0.11", default-features = false, features = ["default-tls", "json"], optional = true }
[dev-dependencies] [dev-dependencies]
frost = { package = "modular-frost", path = "../../crypto/frost", features = ["tests"] } frost = { package = "modular-frost", path = "../../crypto/frost", features = ["tests"] }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["macros"] }
[features] [features]
std = [ std = [
@ -52,13 +52,13 @@ std = [
"k256/std", "k256/std",
"transcript", "transcript/std",
"frost", "frost",
"hex", "hex/std",
"serde", "serde/std",
"serde_json", "serde_json/std",
"reqwest" "reqwest",
] ]
hazmat = [] hazmat = []
default = ["std"] default = ["std"]

View file

@ -15,7 +15,7 @@ rustdoc-args = ["--cfg", "docsrs"]
std-shims = { path = "../../common/std-shims", version = "^0.1.1", default-features = false } std-shims = { path = "../../common/std-shims", version = "^0.1.1", default-features = false }
async-trait = { version = "0.1", default-features = false } async-trait = { version = "0.1", default-features = false }
thiserror = { version = "1", optional = true } thiserror = { version = "1", default-features = false, optional = true }
zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] } zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] }
subtle = { version = "^2.4", default-features = false } subtle = { version = "^2.4", default-features = false }
@ -40,8 +40,8 @@ multiexp = { path = "../../crypto/multiexp", version = "0.4", default-features =
# Needed for multisig # Needed for multisig
transcript = { package = "flexible-transcript", path = "../../crypto/transcript", version = "0.3", default-features = false, features = ["recommended"], optional = true } transcript = { package = "flexible-transcript", path = "../../crypto/transcript", version = "0.3", default-features = false, features = ["recommended"], optional = true }
dleq = { path = "../../crypto/dleq", version = "0.4", features = ["serialize"], optional = true } dleq = { path = "../../crypto/dleq", version = "0.4", default-features = false, features = ["serialize"], optional = true }
frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.8", features = ["ed25519"], optional = true } frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.8", default-features = false, features = ["ed25519"], optional = true }
monero-generators = { path = "generators", version = "0.4", default-features = false } monero-generators = { path = "generators", version = "0.4", default-features = false }
@ -55,7 +55,7 @@ serde_json = { version = "1", default-features = false, features = ["alloc"] }
base58-monero = { version = "2", default-features = false, features = ["check"] } base58-monero = { version = "2", default-features = false, features = ["check"] }
# Used for the provided HTTP RPC # Used for the provided HTTP RPC
digest_auth = { version = "0.3", optional = true } digest_auth = { version = "0.3", default-features = false, optional = true }
hyper = { version = "0.14", default-features = false, features = ["http1", "tcp", "client", "backports", "deprecated"], optional = true } hyper = { version = "0.14", default-features = false, features = ["http1", "tcp", "client", "backports", "deprecated"], optional = true }
hyper-rustls = { version = "0.24", default-features = false, features = ["http1", "native-tokio"], optional = true } hyper-rustls = { version = "0.24", default-features = false, features = ["http1", "native-tokio"], optional = true }
tokio = { version = "1", default-features = false, optional = true } tokio = { version = "1", default-features = false, optional = true }
@ -65,7 +65,7 @@ dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.4", defaul
monero-generators = { path = "generators", version = "0.4", default-features = false } monero-generators = { path = "generators", version = "0.4", default-features = false }
[dev-dependencies] [dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "sync", "macros"] } tokio = { version = "1", features = ["sync", "macros"] }
frost = { package = "modular-frost", path = "../../crypto/frost", features = ["tests"] } frost = { package = "modular-frost", path = "../../crypto/frost", features = ["tests"] }
@ -79,14 +79,18 @@ std = [
"subtle/std", "subtle/std",
"rand_core/std", "rand_core/std",
"rand_chacha/std",
"rand/std", "rand/std",
"rand_chacha/std",
"rand_distr/std", "rand_distr/std",
"sha3/std", "sha3/std",
"pbkdf2/std",
"multiexp/std", "multiexp/std",
"transcript/std",
"dleq/std",
"monero-generators/std", "monero-generators/std",
"futures/std", "futures/std",

View file

@ -14,8 +14,8 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
spin = { version = "0.9", features = ["mutex", "once"] } spin = { version = "0.9", default-features = false, features = ["use_ticket_mutex", "once"] }
hashbrown = "0.14" hashbrown = { version = "0.14", default-features = false, features = ["ahash", "inline-more"] }
[features] [features]
std = [] std = []

View file

@ -17,5 +17,7 @@ rustdoc-args = ["--cfg", "docsrs"]
zeroize = { version = "^1.5", default-features = false } zeroize = { version = "^1.5", default-features = false }
[features] [features]
std = ["zeroize/std"]
default = ["std"]
# Commented for now as it requires nightly and we don't use nightly # Commented for now as it requires nightly and we don't use nightly
# allocator = [] # allocator = []

View file

@ -14,23 +14,21 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
async-trait = "0.1" async-trait = { version = "0.1", default-features = false }
zeroize = "^1.5" zeroize = { version = "^1.5", default-features = false, features = ["std"] }
rand_core = "0.6" rand_core = { version = "0.6", default-features = false, features = ["std"] }
rand_chacha = "0.3" rand_chacha = { version = "0.3", default-features = false, features = ["std"] }
blake2 = "0.10" blake2 = { version = "0.10", default-features = false, features = ["std"] }
transcript = { package = "flexible-transcript", path = "../crypto/transcript", features = ["recommended"] } transcript = { package = "flexible-transcript", path = "../crypto/transcript", default-features = false, features = ["std", "recommended"] }
ciphersuite = { path = "../crypto/ciphersuite" } ciphersuite = { path = "../crypto/ciphersuite", default-features = false, features = ["std"] }
schnorr = { package = "schnorr-signatures", path = "../crypto/schnorr" } schnorr = { package = "schnorr-signatures", path = "../crypto/schnorr", default-features = false, features = ["std"] }
frost = { package = "modular-frost", path = "../crypto/frost" } frost = { package = "modular-frost", path = "../crypto/frost" }
frost-schnorrkel = { path = "../crypto/schnorrkel" } frost-schnorrkel = { path = "../crypto/schnorrkel" }
scale = { package = "parity-scale-codec", version = "3", features = ["derive"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive"] }
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
serai-db = { path = "../common/db", features = ["rocksdb"] } serai-db = { path = "../common/db", features = ["rocksdb"] }
serai-env = { path = "../common/env" } serai-env = { path = "../common/env" }
@ -39,20 +37,21 @@ processor-messages = { package = "serai-processor-messages", path = "../processo
message-queue = { package = "serai-message-queue", path = "../message-queue" } message-queue = { package = "serai-message-queue", path = "../message-queue" }
tributary = { package = "tributary-chain", path = "./tributary" } tributary = { package = "tributary-chain", path = "./tributary" }
serai-client = { path = "../substrate/client", features = ["serai"] } serai-client = { path = "../substrate/client", default-features = false, features = ["serai"] }
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
bincode = "1" bincode = { version = "1", default-features = false }
serde_json = { version = "1", default-features = false } serde_json = { version = "1", default-features = false, features = ["std"] }
log = "0.4" log = { version = "0.4", default-features = false, features = ["std"] }
env_logger = "0.10" env_logger = { version = "0.10", default-features = false, features = ["humantime"] }
futures = "0.3" futures = { version = "0.3", default-features = false, features = ["std"] }
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] } tokio = { version = "1", default-features = false, features = ["rt-multi-thread", "sync", "time", "macros"] }
libp2p = { version = "0.52", features = ["tokio", "tcp", "noise", "yamux", "gossipsub", "mdns", "macros"] } libp2p = { version = "0.52", default-features = false, features = ["tokio", "tcp", "noise", "yamux", "gossipsub", "mdns", "macros"] }
[dev-dependencies] [dev-dependencies]
futures = "0.3" futures = { version = "0.3", default-features = false, features = ["std"] }
tributary = { package = "tributary-chain", path = "./tributary", features = ["tests"] } tributary = { package = "tributary-chain", path = "./tributary", features = ["tests"] }
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false } sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }

View file

@ -8,31 +8,31 @@ authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
async-trait = "0.1" async-trait = { version = "0.1", default-features = false }
thiserror = "1" thiserror = { version = "1", default-features = false }
subtle = "^2" subtle = { version = "^2", default-features = false, features = ["std"] }
zeroize = "^1.5" zeroize = { version = "^1.5", default-features = false, features = ["std"] }
rand = "0.8" rand = { version = "0.8", default-features = false, features = ["std"] }
rand_chacha = "0.3" rand_chacha = { version = "0.3", default-features = false, features = ["std"] }
blake2 = "0.10" blake2 = { version = "0.10", default-features = false, features = ["std"] }
transcript = { package = "flexible-transcript", path = "../../crypto/transcript", features = ["recommended"] } transcript = { package = "flexible-transcript", path = "../../crypto/transcript", default-features = false, features = ["std", "recommended"] }
ciphersuite = { package = "ciphersuite", path = "../../crypto/ciphersuite", features = ["ristretto"] } ciphersuite = { package = "ciphersuite", path = "../../crypto/ciphersuite", default-features = false, features = ["std", "ristretto"] }
schnorr = { package = "schnorr-signatures", path = "../../crypto/schnorr" } schnorr = { package = "schnorr-signatures", path = "../../crypto/schnorr", default-features = false, features = ["std"] }
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
log = "0.4" log = { version = "0.4", default-features = false, features = ["std"] }
serai-db = { path = "../../common/db" } serai-db = { path = "../../common/db" }
scale = { package = "parity-scale-codec", version = "3", features = ["derive"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive"] }
futures = "0.3" futures = { version = "0.3", default-features = false, features = ["std"] }
tendermint = { package = "tendermint-machine", path = "./tendermint" } tendermint = { package = "tendermint-machine", path = "./tendermint" }
tokio = { version = "1", features = ["sync", "time", "rt"] } tokio = { version = "1", default-features = false, features = ["sync", "time", "rt"] }
[dev-dependencies] [dev-dependencies]
tokio = { version = "1", features = ["macros"] } tokio = { version = "1", features = ["macros"] }

View file

@ -8,16 +8,16 @@ authors = ["Luke Parker <lukeparker5132@gmail.com>"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
async-trait = "0.1" async-trait = { version = "0.1", default-features = false }
thiserror = "1" thiserror = { version = "1", default-features = false }
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
log = "0.4" log = { version = "0.4", default-features = false, features = ["std"] }
parity-scale-codec = { version = "3", features = ["derive"] } parity-scale-codec = { version = "3", default-features = false, features = ["std", "derive"] }
futures = "0.3" futures = { version = "0.3", default-features = false, features = ["std", "async-await"] }
tokio = { version = "1", features = ["sync", "time"] } tokio = { version = "1", default-features = false, features = ["sync", "time"] }
[dev-dependencies] [dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros"] } tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

View file

@ -38,15 +38,36 @@ k256 = { version = "^0.13.1", default-features = false, features = ["arithmetic"
minimal-ed448 = { path = "../ed448", version = "0.4", default-features = false, optional = true } minimal-ed448 = { path = "../ed448", version = "0.4", default-features = false, optional = true }
[dev-dependencies] [dev-dependencies]
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
rand_core = { version = "0.6", features = ["std"] } rand_core = { version = "0.6", default-features = false, features = ["std"] }
ff-group-tests = { version = "0.13", path = "../ff-group-tests" } ff-group-tests = { version = "0.13", path = "../ff-group-tests" }
[features] [features]
alloc = ["std-shims"] alloc = ["std-shims"]
std = ["zeroize/std", "std-shims/std"] std = [
"std-shims/std",
"rand_core/std",
"zeroize/std",
"subtle/std",
"digest/std",
"transcript/std",
"sha2?/std",
"sha3?/std",
"ff/std",
"dalek-ff-group?/std",
"elliptic-curve?/std",
"p256?/std",
"k256?/std",
"minimal-ed448?/std",
]
dalek = ["sha2", "dalek-ff-group"] dalek = ["sha2", "dalek-ff-group"]
ed25519 = ["dalek"] ed25519 = ["dalek"]

View file

@ -32,5 +32,9 @@ sha2 = { version = "0.10", default-features = false }
curve25519-dalek = { version = ">= 4.0, < 4.2", default-features = false, features = ["alloc", "zeroize", "digest", "group", "precomputed-tables"] } curve25519-dalek = { version = ">= 4.0, < 4.2", default-features = false, features = ["alloc", "zeroize", "digest", "group", "precomputed-tables"] }
[dev-dependencies] [dev-dependencies]
rand_core = { version = "0.6", features = ["std"] } rand_core = { version = "0.6", default-features = false, features = ["std"] }
ff-group-tests = { path = "../ff-group-tests" } ff-group-tests = { path = "../ff-group-tests" }
[features]
std = ["zeroize/std", "subtle/std", "rand_core/std", "digest/std", "sha2/std"]
default = ["std"]

View file

@ -40,16 +40,22 @@ ciphersuite = { path = "../ciphersuite", default-features = false, features = ["
[features] [features]
std = [ std = [
"thiserror", "thiserror",
"rand_core/std", "rand_core/std",
"std-shims/std", "std-shims/std",
"ciphersuite/std", "serde/std",
"multiexp/batch", "transcript/std",
"chacha20/std",
"ciphersuite/std",
"multiexp/std", "multiexp/std",
"multiexp/batch",
"schnorr/std", "schnorr/std",
"dleq/std",
"dleq/serialize" "dleq/serialize"
] ]
serde = ["dep:serde"] serde = ["dep:serde"]

View file

@ -41,15 +41,18 @@ dalek-ff-group = { path = "../dalek-ff-group" }
transcript = { package = "flexible-transcript", path = "../transcript", features = ["recommended"] } transcript = { package = "flexible-transcript", path = "../transcript", features = ["recommended"] }
[features] [features]
std = [] std = ["rand_core/std", "zeroize/std", "digest/std", "transcript/std", "ff/std", "multiexp?/std"]
serialize = ["std"] serialize = ["std"]
# Needed for cross-group DLEqs # Needed for cross-group DLEqs
secure_capacity_difference = [] secure_capacity_difference = []
experimental = ["std", "thiserror", "multiexp"] experimental = ["std", "thiserror", "multiexp"]
# Only applies to experimental, yet is default to ensure security default = [
# experimental doesn't mandate it itself in case two curves with extreme "std",
# capacity differences are desired to be used together, in which case the user # Only applies to experimental, yet is default to ensure security
# must specify experimental without default features # experimental doesn't mandate it itself in case two curves with extreme
default = ["secure_capacity_difference"] # capacity differences are desired to be used together, in which case the user
# must specify experimental without default features
"secure_capacity_difference"
]

View file

@ -28,8 +28,12 @@ generic-array = { version = "1", default-features = false }
crypto-bigint = { version = "0.5", default-features = false, features = ["zeroize"] } crypto-bigint = { version = "0.5", default-features = false, features = ["zeroize"] }
[dev-dependencies] [dev-dependencies]
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
rand_core = { version = "0.6", features = ["std"] } rand_core = { version = "0.6", default-features = false, features = ["std"] }
ff-group-tests = { path = "../ff-group-tests" } ff-group-tests = { path = "../ff-group-tests" }
[features]
std = ["rand_core/std", "zeroize/std", "subtle/std", "ff/std"]
default = ["std"]

View file

@ -32,7 +32,7 @@ k256 = { version = "^0.13.1", default-features = false, features = ["arithmetic"
dalek-ff-group = { path = "../dalek-ff-group" } dalek-ff-group = { path = "../dalek-ff-group" }
[features] [features]
std = ["std-shims/std", "zeroize/std"] std = ["std-shims/std", "zeroize/std", "ff/std", "rand_core/std"]
batch = ["rand_core"] batch = ["rand_core"]

View file

@ -36,5 +36,5 @@ dalek-ff-group = { path = "../dalek-ff-group" }
ciphersuite = { path = "../ciphersuite", features = ["ed25519"] } ciphersuite = { path = "../ciphersuite", features = ["ed25519"] }
[features] [features]
std = ["std-shims/std", "ciphersuite/std", "multiexp/std"] std = ["std-shims/std", "rand_core/std", "zeroize/std", "transcript/std", "ciphersuite/std", "multiexp/std"]
default = ["std"] default = ["std"]

View file

@ -29,6 +29,8 @@ sha2 = { version = "0.10", default-features = false }
blake2 = { version = "0.10", default-features = false } blake2 = { version = "0.10", default-features = false }
[features] [features]
std = ["subtle/std", "zeroize/std", "digest/std", "blake2?/std", "merlin?/std"]
recommended = ["blake2"] recommended = ["blake2"]
merlin = ["dep:merlin"] merlin = ["dep:merlin"]
tests = [] tests = []
default = ["std"]

View file

@ -15,28 +15,29 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
# Macros # Macros
lazy_static = "1" lazy_static = { version = "1", default-features = false }
serde = { version = "1", features = ["derive"] } serde = { version = "1", default-features = false, features = ["std", "derive"] }
# Encoders # Encoders
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
bincode = "1" bincode = { version = "1", default-features = false }
serde_json = "1" serde_json = { version = "1", default-features = false, features = ["std"] }
# Libs # Libs
zeroize = "1" zeroize = { version = "1", default-features = false, features = ["std"] }
rand_core = "0.6" rand_core = { version = "0.6", default-features = false, features = ["std"] }
# Cryptography # Cryptography
transcript = { package = "flexible-transcript", path = "../crypto/transcript", features = ["recommended"] } transcript = { package = "flexible-transcript", path = "../crypto/transcript", default-features = false, features = ["std", "recommended"] }
ciphersuite = { path = "../crypto/ciphersuite", features = ["ristretto"] } ciphersuite = { path = "../crypto/ciphersuite", default-features = false, features = ["std", "ristretto"] }
schnorr-signatures = { path = "../crypto/schnorr" } schnorr-signatures = { path = "../crypto/schnorr", default-features = false, features = ["std"] }
# Application # Application
log = "0.4" log = { version = "0.4", default-features = false, features = ["std"] }
env_logger = "0.10" env_logger = { version = "0.10", default-features = false, features = ["humantime"] }
tokio = { version = "1", features = ["rt-multi-thread", "time", "macros"] } # Uses a single threaded runtime since this shouldn't ever be CPU-bound
tokio = { version = "1", default-features = false, features = ["rt", "time", "macros"] }
serai-db = { path = "../common/db", optional = true } serai-db = { path = "../common/db", optional = true }
@ -44,8 +45,8 @@ serai-env = { path = "../common/env" }
serai-primitives = { path = "../substrate/primitives" } serai-primitives = { path = "../substrate/primitives" }
jsonrpsee = { version = "0.16", features = ["server"], optional = true } jsonrpsee = { version = "0.16", default-features = false, features = ["server"], optional = true }
reqwest = { version = "0.11", features = ["json"] } reqwest = { version = "0.11", default-features = false, features = ["json"] }
[features] [features]
binaries = ["serai-db", "serai-db/rocksdb", "jsonrpsee"] binaries = ["serai-db", "serai-db/rocksdb", "jsonrpsee"]

View file

@ -15,47 +15,44 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
# Macros # Macros
async-trait = "0.1" async-trait = { version = "0.1", default-features = false }
lazy_static = "1" lazy_static = { version = "1", default-features = false }
zeroize = "1" zeroize = { version = "1", default-features = false, features = ["std"] }
thiserror = "1" thiserror = { version = "1", default-features = false }
serde = { version = "1", default-features = false, features = ["derive"] } serde = { version = "1", default-features = false, features = ["std", "derive"] }
# Libs # Libs
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } rand_core = { version = "0.6", default-features = false, features = ["std", "getrandom"] }
rand_chacha = { version = "0.3", default-features = false } rand_chacha = { version = "0.3", default-features = false, features = ["std"] }
# Encoders # Encoders
hex = "0.4" hex = { version = "0.4", default-features = false, features = ["std"] }
scale = { package = "parity-scale-codec", version = "3" } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std"] }
bincode = { version = "1", default-features = false } bincode = { version = "1", default-features = false }
serde_json = { version = "1", default-features = false } serde_json = { version = "1", default-features = false, features = ["std"] }
# Cryptography # Cryptography
ciphersuite = { path = "../crypto/ciphersuite", default-features = false, features = ["ristretto"] } ciphersuite = { path = "../crypto/ciphersuite", default-features = false, features = ["std", "ristretto"] }
transcript = { package = "flexible-transcript", default-features = false, path = "../crypto/transcript" } transcript = { package = "flexible-transcript", path = "../crypto/transcript", default-features = false, features = ["std"] }
frost = { package = "modular-frost", path = "../crypto/frost", features = ["ristretto"] } frost = { package = "modular-frost", path = "../crypto/frost", default-features = false, features = ["ristretto"] }
frost-schnorrkel = { path = "../crypto/schnorrkel" } frost-schnorrkel = { path = "../crypto/schnorrkel", default-features = false }
# Substrate
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
# Bitcoin # Bitcoin
secp256k1 = { version = "0.28", features = ["global-context", "rand-std"], optional = true } secp256k1 = { version = "0.28", default-features = false, features = ["std", "global-context", "rand-std"], optional = true }
k256 = { version = "^0.13.1", optional = true } k256 = { version = "^0.13.1", default-features = false, features = ["std"], optional = true }
bitcoin-serai = { path = "../coins/bitcoin", optional = true } bitcoin-serai = { path = "../coins/bitcoin", default-features = false, features = ["std"], optional = true }
# Monero # Monero
dalek-ff-group = { path = "../crypto/dalek-ff-group", optional = true } dalek-ff-group = { path = "../crypto/dalek-ff-group", default-features = false, features = ["std"], optional = true }
monero-serai = { path = "../coins/monero", features = ["multisig"], optional = true } monero-serai = { path = "../coins/monero", default-features = false, features = ["std", "http-rpc", "multisig"], optional = true }
# Application # Application
log = "0.4" log = { version = "0.4", default-features = false, features = ["std"] }
env_logger = "0.10" env_logger = { version = "0.10", default-features = false, features = ["humantime"] }
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] } tokio = { version = "1", default-features = false, features = ["rt-multi-thread", "sync", "time", "macros"] }
serai-db = { path = "../common/db", default-features = false, features = ["rocksdb"] } serai-db = { path = "../common/db", features = ["rocksdb"] }
serai-env = { path = "../common/env" } serai-env = { path = "../common/env" }
serai-client = { path = "../substrate/client", default-features = false } serai-client = { path = "../substrate/client", default-features = false }
@ -64,11 +61,11 @@ messages = { package = "serai-processor-messages", path = "./messages" }
message-queue = { package = "serai-message-queue", path = "../message-queue" } message-queue = { package = "serai-message-queue", path = "../message-queue" }
[dev-dependencies] [dev-dependencies]
futures = "0.3" futures = { version = "0.3", default-features = false }
frost = { package = "modular-frost", path = "../crypto/frost", features = ["tests"] } frost = { package = "modular-frost", path = "../crypto/frost", features = ["tests"] }
env_logger = "0.10" sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }
dockertest = "0.4" dockertest = "0.4"
serai-docker-tests = { path = "../tests/docker" } serai-docker-tests = { path = "../tests/docker" }

View file

@ -14,14 +14,14 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
zeroize = { version = "1", features = ["derive"] } zeroize = { version = "1", default-features = false, features = ["std", "derive"] }
scale = { package = "parity-scale-codec", version = "3", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", default-features = false, features = ["std", "derive"] }
dkg = { path = "../../crypto/dkg", features = ["serde"] } dkg = { path = "../../crypto/dkg", default-features = false, features = ["std", "serde"] }
serai-primitives = { path = "../../substrate/primitives" } serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] }
in-instructions-primitives = { package = "serai-in-instructions-primitives", path = "../../substrate/in-instructions/primitives" } in-instructions-primitives = { package = "serai-in-instructions-primitives", path = "../../substrate/in-instructions/primitives", default-features = false, features = ["std"] }
coins-primitives = { package = "serai-coins-primitives", path = "../../substrate/coins/primitives" } coins-primitives = { package = "serai-coins-primitives", path = "../../substrate/coins/primitives", default-features = false, features = ["std"] }
validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../../substrate/validator-sets/primitives" } validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std"] }