Cargo Features

[dependencies]
frame-support = { version = "32.0.0", default-features = false, features = ["std", "try-runtime", "experimental", "runtime-benchmarks", "no-metadata-docs", "full-metadata-docs", "tuples-96", "tuples-128"] }
default = std

The std feature is set by default whenever frame-support is added without default-features = false somewhere in the dependency tree.

std default

Enables std of parity-scale-codec, environmental, frame-metadata, frame-support-procedural, k256, log, scale-info, serde, serde_json, sp-api, sp-arithmetic, sp-core, sp-debug-derive, sp-genesis-builder, sp-inherents, sp-io, sp-metadata-ir, sp-runtime, sp-staking, sp-state-machine, sp-std, sp-tracing, and sp-weights

serde:

Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.

Affects frame-support::testing_prelude, migrations::SteppedMigrations.integrity_test, hooks::GenesisBuild.build_storage, hooks::GenesisBuild.assimilate_storage

try-runtime

Enables try-runtime of sp-runtime and force-debug of sp-debug-derive

sp-debug-derive:

By default RuntimeDebug implements Debug that outputs <wasm:stripped> when std is disabled. However, sometimes downstream users need to have the real Debug implementation for debugging purposes. If this is required, a user only needs to add this crate as a dependency of their runtime and enable the force-debug feature.

Affects hooks::OnRuntimeUpgrade.try_on_runtime_upgrade, hooks::OnRuntimeUpgrade.pre_upgrade, hooks::OnRuntimeUpgrade.post_upgrade, hooks::UncheckedOnRuntimeUpgrade.pre_upgrade, hooks::UncheckedOnRuntimeUpgrade.post_upgrade, hooks::Hooks.try_state, hooks::Hooks.pre_upgrade, hooks::Hooks.post_upgrade

experimental

Enables experimental of frame-support-procedural

Affects frame-support::dynamic_params

runtime-benchmarks

Enables runtime-benchmarks of sp-runtime and sp-staking

Affects dispatch::EnsureOrigin.try_successful_origin, dispatch::EnsureOriginWithArg.try_successful_origin, members::SortedMembers.add, misc::ConversionFromAssetBalance.ensure_successful, pay::Pay.ensure_successful, pay::Pay.ensure_concluded, voting::VoteTally.unanimity, voting::VoteTally.rejection, voting::VoteTally.from_requirements, voting::VoteTally.setup, voting::Polling.create_ongoing, voting::Polling.end_ongoing, voting::Polling.max_ongoing

no-metadata-docs

By default some types have documentation, no-metadata-docs allows to reduce the documentation in the metadata.

Enables no-metadata-docs of frame-support-procedural and sp-api

full-metadata-docs

By default some types have documentation, full-metadata-docs allows to add documentation to more types in the metadata.

Enables docs of scale-info

tuples-96

Generate impl-trait for tuples with the given number of tuples. Will be needed as the number of pallets in a runtime grows. Does increase the compile time!

Enables tuples-96 of frame-support-procedural

tuples-128

Enables tuples-128 of frame-support-procedural

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

sp-state-machine std