mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
Fix nostd build of several crates (#4060)
Preparation for https://github.com/paritytech/polkadot-sdk/pull/3935 Changes: - Add some `default-features = false` for the case that a crate and that dependency both support nostd builds. - Shuffle files around of some benchmarking-only crates. These conditionally disabled the `cfg_attr` for nostd and pulled in libstd. Example [here](https://github.com/ggwpez/zepter/pull/95). The actual logic is moved into a `inner.rs` to preserve nostd capability of the crate in case the benchmarking feature is disabled. - Add some `use sp_std::vec` where needed. - Remove some `optional = true` in cases where it was not optional. - Removed one superfluous `cfg_attr(not(feature = "std"), no_std..`. All in all this should be logical no-op. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
bfbf7f5d6f
commit
7a2c9d4a9a
@@ -26,7 +26,7 @@ sp-arithmetic = { path = "../../substrate/primitives/arithmetic", default-featur
|
||||
sp-authority-discovery = { path = "../../substrate/primitives/authority-discovery", default-features = false, features = ["serde"] }
|
||||
sp-consensus-slots = { path = "../../substrate/primitives/consensus/slots", default-features = false, features = ["serde"] }
|
||||
sp-io = { path = "../../substrate/primitives/io", default-features = false }
|
||||
sp-keystore = { path = "../../substrate/primitives/keystore", optional = true }
|
||||
sp-keystore = { path = "../../substrate/primitives/keystore", optional = true, default-features = false }
|
||||
sp-staking = { path = "../../substrate/primitives/staking", default-features = false, features = ["serde"] }
|
||||
sp-std = { package = "sp-std", path = "../../substrate/primitives/std", default-features = false }
|
||||
|
||||
@@ -53,6 +53,7 @@ std = [
|
||||
"sp-consensus-slots/std",
|
||||
"sp-io/std",
|
||||
"sp-keystore",
|
||||
"sp-keystore?/std",
|
||||
"sp-staking/std",
|
||||
"sp-std/std",
|
||||
]
|
||||
|
||||
@@ -28,7 +28,7 @@ sp-runtime = { path = "../../../substrate/primitives/runtime", default-features
|
||||
sp-session = { path = "../../../substrate/primitives/session", default-features = false }
|
||||
sp-staking = { path = "../../../substrate/primitives/staking", default-features = false, features = ["serde"] }
|
||||
sp-core = { path = "../../../substrate/primitives/core", default-features = false, features = ["serde"] }
|
||||
sp-keystore = { path = "../../../substrate/primitives/keystore", optional = true }
|
||||
sp-keystore = { path = "../../../substrate/primitives/keystore", optional = true, default-features = false }
|
||||
sp-application-crypto = { path = "../../../substrate/primitives/application-crypto", default-features = false, optional = true }
|
||||
sp-tracing = { path = "../../../substrate/primitives/tracing", default-features = false, optional = true }
|
||||
sp-arithmetic = { path = "../../../substrate/primitives/arithmetic", default-features = false }
|
||||
@@ -108,6 +108,7 @@ std = [
|
||||
"sp-core/std",
|
||||
"sp-io/std",
|
||||
"sp-keystore",
|
||||
"sp-keystore?/std",
|
||||
"sp-runtime/std",
|
||||
"sp-session/std",
|
||||
"sp-staking/std",
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg(test)]
|
||||
|
||||
use codec::Encode;
|
||||
|
||||
Reference in New Issue
Block a user