Cargo Features

parity-scale-codec = { version = "3.6.9", default-features = false, features = ["std", "derive", "bit-vec", "fuzz", "max-encoded-len", "chain-error", "full", "serde", "bytes", "generic-array"] }
default = std

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

std default fuzz? = chain-error

Enables std of optional bitvec, byte-slice-cast, and serde

Affects codec::IoReader, parity-scale-codec::alloc

derive = parity-scale-codec-derive
bit-vec = bitvec
fuzz = arbitrary, std

Enables the new MaxEncodedLen trait. NOTE: This is still considered experimental and is exempt from the usual SemVer guarantees. We do not guarantee no code breakage when using this.

Enables max-encoded-len of optional parity-scale-codec-derive

chain-error std

Make error fully descriptive with chaining error message.
Should not be used in a constrained environment.


This does not do anthing anymore. Remove with the next major release.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

serde implicit feature
bytes implicit feature

Affects codec::Input.scale_internal_decode_bytes, codec::decode_from_bytes

generic-array implicit feature

Enables generic-array ^0.14.7

arbitrary fuzz?

With derive