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>
parent
bfbf7f5d
Showing
- cumulus/pallets/session-benchmarking/src/inner.rs 42 additions, 0 deletionscumulus/pallets/session-benchmarking/src/inner.rs
- cumulus/pallets/session-benchmarking/src/lib.rs 9 additions, 25 deletionscumulus/pallets/session-benchmarking/src/lib.rs
- cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml 1 addition, 9 deletions...us/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs 0 additions, 19 deletions...us/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml 2 additions, 2 deletions...us/parachains/runtimes/glutton/glutton-westend/Cargo.toml
- cumulus/primitives/parachain-inherent/Cargo.toml 4 additions, 2 deletionscumulus/primitives/parachain-inherent/Cargo.toml
- polkadot/primitives/Cargo.toml 2 additions, 1 deletionpolkadot/primitives/Cargo.toml
- polkadot/runtime/parachains/Cargo.toml 2 additions, 1 deletionpolkadot/runtime/parachains/Cargo.toml
- polkadot/xcm/xcm-executor/integration-tests/src/lib.rs 0 additions, 1 deletionpolkadot/xcm/xcm-executor/integration-tests/src/lib.rs
- prdoc/pr_4060.prdoc 54 additions, 0 deletionsprdoc/pr_4060.prdoc
- substrate/frame/Cargo.toml 1 addition, 1 deletionsubstrate/frame/Cargo.toml
- substrate/frame/atomic-swap/src/lib.rs 1 addition, 0 deletionssubstrate/frame/atomic-swap/src/lib.rs
- substrate/frame/election-provider-support/benchmarking/src/inner.rs 89 additions, 0 deletions...frame/election-provider-support/benchmarking/src/inner.rs
- substrate/frame/election-provider-support/benchmarking/src/lib.rs 4 additions, 70 deletions...e/frame/election-provider-support/benchmarking/src/lib.rs
- substrate/frame/examples/dev-mode/src/lib.rs 1 addition, 0 deletionssubstrate/frame/examples/dev-mode/src/lib.rs
- substrate/frame/examples/offchain-worker/Cargo.toml 1 addition, 1 deletionsubstrate/frame/examples/offchain-worker/Cargo.toml
- substrate/frame/indices/Cargo.toml 2 additions, 1 deletionsubstrate/frame/indices/Cargo.toml
- substrate/frame/nomination-pools/Cargo.toml 2 additions, 2 deletionssubstrate/frame/nomination-pools/Cargo.toml
- substrate/frame/nomination-pools/benchmarking/src/inner.rs 846 additions, 0 deletionssubstrate/frame/nomination-pools/benchmarking/src/inner.rs
- substrate/frame/nomination-pools/benchmarking/src/lib.rs 6 additions, 829 deletionssubstrate/frame/nomination-pools/benchmarking/src/lib.rs
Please register or sign in to comment