A Cargo feature is a named configuration option for conditional compilation. It can select code paths, add dependencies, or enable features in dependencies. section 6.3
Use features to add optional capabilities without enabling every dependency behavior:
- Add a feature in a dependency configuration object. section 6.3
- Enable Serde's derive feature to generate parsing and deserialization implementations for a data type. section 6.3
- Combine the feature with a derived trait such as serde::Deserialize to make JSON parsing work. section 6.3
Enabling Serde derive support
In Cargo.toml, write `serde = { version = "1.0", features = ["derive"] }`. Then `#[derive(Debug, serde::Deserialize)]` lets `serde_json::from_str` deserialize JSON into a declared Rust struct. section 6.3

