Files
pezkuwi-subxt/polkadot/primitives/Cargo.toml
T
Oliver Tale-Yazdi 7a2c9d4a9a 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>
2024-04-17 15:52:00 +00:00

65 lines
2.7 KiB
TOML

[package]
name = "polkadot-primitives"
version = "7.0.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
description = "Shared primitives used by Polkadot runtime"
[lints]
workspace = true
[dependencies]
bitvec = { version = "1.0.0", default-features = false, features = ["alloc", "serde"] }
hex-literal = "0.4.1"
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["bit-vec", "derive"] }
scale-info = { version = "2.11.1", default-features = false, features = ["bit-vec", "derive", "serde"] }
log = { workspace = true, default-features = false }
serde = { features = ["alloc", "derive"], workspace = true }
application-crypto = { package = "sp-application-crypto", path = "../../substrate/primitives/application-crypto", default-features = false, features = ["serde"] }
inherents = { package = "sp-inherents", path = "../../substrate/primitives/inherents", default-features = false }
primitives = { package = "sp-core", path = "../../substrate/primitives/core", default-features = false }
runtime_primitives = { package = "sp-runtime", path = "../../substrate/primitives/runtime", default-features = false }
sp-api = { path = "../../substrate/primitives/api", default-features = false }
sp-arithmetic = { path = "../../substrate/primitives/arithmetic", default-features = false, features = ["serde"] }
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, 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 }
polkadot-core-primitives = { path = "../core-primitives", default-features = false }
polkadot-parachain-primitives = { path = "../parachain", default-features = false }
[features]
default = ["std"]
std = [
"application-crypto/std",
"bitvec/std",
"inherents/std",
"log/std",
"parity-scale-codec/std",
"polkadot-core-primitives/std",
"polkadot-parachain-primitives/std",
"primitives/std",
"runtime_primitives/std",
"scale-info/std",
"serde/std",
"sp-api/std",
"sp-arithmetic/std",
"sp-authority-discovery/std",
"sp-consensus-slots/std",
"sp-io/std",
"sp-keystore",
"sp-keystore?/std",
"sp-staking/std",
"sp-std/std",
]
runtime-benchmarks = [
"polkadot-parachain-primitives/runtime-benchmarks",
"runtime_primitives/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
]