Fix Rust features (#11976)

* Add std feature

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Cleanup

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Impl function also in tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make compile

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix sp-trie feature

Something makes the bench regression guard fail, maybe this?

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add runtime-benchmarks feature to sc-service

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Fix sp-trie feature"

This reverts commit f2cddfe41bc72e6f2f8133795ec9408ba0c3ec63.
Was already fixed, only needed a CI retry.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-09-14 18:31:58 +02:00
committed by GitHub
parent b1bbdf1192
commit 45966d509e
84 changed files with 250 additions and 110 deletions
+4 -4
View File
@@ -19,8 +19,8 @@ sp-core = { version = "6.0.0", default-features = false, path = "../core" }
sp-std = { version = "4.0.0", default-features = false, path = "../std" }
sp-runtime = { version = "6.0.0", default-features = false, path = "../runtime" }
sp-version = { version = "5.0.0", default-features = false, path = "../version" }
sp-state-machine = { version = "0.12.0", optional = true, path = "../state-machine" }
sp-trie = { version = "6.0.0", optional = true, path = "../trie" }
sp-state-machine = { version = "0.12.0", default-features = false, optional = true, path = "../state-machine" }
sp-trie = { version = "6.0.0", default-features = false, optional = true, path = "../trie" }
hash-db = { version = "0.15.2", optional = true }
thiserror = { version = "1.0.30", optional = true }
@@ -36,8 +36,8 @@ std = [
"sp-core/std",
"sp-std/std",
"sp-runtime/std",
"sp-state-machine",
"sp-trie",
"sp-state-machine/std",
"sp-trie/std",
"sp-version/std",
"hash-db",
"thiserror",
+2
View File
@@ -79,6 +79,8 @@ bench = false
[features]
default = ["std"]
std = [
"parity-util-mem/std",
"merlin?/std",
"full_crypto",
"log/std",
"thiserror",
@@ -24,6 +24,7 @@ sp-std = { version = "4.0.0", default-features = false, path = "../../std" }
[features]
default = ["std"]
std = [
"digest/std",
"blake2/std",
"byteorder/std",
"sha2/std",
+2 -2
View File
@@ -19,7 +19,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
impl-trait-for-tuples = "0.2.2"
thiserror = { version = "1.0.30", optional = true }
sp-core = { version = "6.0.0", default-features = false, path = "../core" }
sp-runtime = { version = "6.0.0", optional = true, path = "../runtime" }
sp-runtime = { version = "6.0.0", optional = true, default-features = false, path = "../runtime" }
sp-std = { version = "4.0.0", default-features = false, path = "../std" }
[dev-dependencies]
@@ -31,7 +31,7 @@ std = [
"async-trait",
"codec/std",
"sp-core/std",
"sp-runtime",
"sp-runtime/std",
"sp-std/std",
"thiserror",
]
+5 -4
View File
@@ -22,10 +22,10 @@ sp-core = { version = "6.0.0", default-features = false, path = "../core" }
sp-keystore = { version = "0.12.0", default-features = false, optional = true, path = "../keystore" }
sp-std = { version = "4.0.0", default-features = false, path = "../std" }
libsecp256k1 = { version = "0.7", optional = true }
sp-state-machine = { version = "0.12.0", optional = true, path = "../state-machine" }
sp-state-machine = { version = "0.12.0", default-features = false, optional = true, path = "../state-machine" }
sp-wasm-interface = { version = "6.0.0", path = "../wasm-interface", default-features = false }
sp-runtime-interface = { version = "6.0.0", default-features = false, path = "../runtime-interface" }
sp-trie = { version = "6.0.0", optional = true, path = "../trie" }
sp-trie = { version = "6.0.0", default-features = false, optional = true, path = "../trie" }
sp-externalities = { version = "0.12.0", default-features = false, path = "../externalities" }
sp-tracing = { version = "5.0.0", default-features = false, path = "../tracing" }
log = { version = "0.4.17", optional = true }
@@ -38,14 +38,15 @@ tracing-core = { version = "0.1.28", default-features = false}
[features]
default = ["std"]
std = [
"bytes/std",
"sp-externalities/std",
"sp-core/std",
"sp-keystore",
"codec/std",
"sp-std/std",
"hash-db/std",
"sp-trie",
"sp-state-machine",
"sp-trie/std",
"sp-state-machine/std",
"libsecp256k1",
"secp256k1",
"sp-runtime-interface/std",
@@ -37,6 +37,8 @@ trybuild = "1.0.60"
[features]
default = [ "std" ]
std = [
"sp-storage/std",
"bytes/std",
"sp-wasm-interface/std",
"sp-std/std",
"sp-tracing/std",
-1
View File
@@ -41,7 +41,6 @@ sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
[features]
bench = []
runtime-benchmarks = []
default = ["std"]
std = [
-4
View File
@@ -19,10 +19,6 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
// to allow benchmarking
#![cfg_attr(feature = "bench", feature(test))]
#[cfg(feature = "bench")]
extern crate test;
#[doc(hidden)]
pub use codec;