Cargo Features

[dependencies]
optional-field = { version = "0.1.6", default-features = false, features = ["serde"] }
default = serde

The serde feature is set by default whenever optional-field is added without default-features = false somewhere in the dependency tree.

Features from optional dependencies

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

serde default