I have a hard time understanding the features entry in the Rust toml.
Let's say I have a dependency (in this case sqlx) saying
sqlx = { version = "0.4.0-beta.1", default-features = false, features = [ "runtime-tokio", "macros", "json", "mysql" ] }
The Rust book says regarding Features:
Cargo supports features to allow expression of:
- conditional compilation options (usable through cfg attributes);
- optional dependencies, which enhance a package, but are not required; and
- clusters of optional dependencies, such as postgres-all, that would include the postgres package, the postgres-macros package, and possibly other packages (such as development-time mocking libraries, debugging tools, etc.).
A feature of a package is either an optional dependency, or a set of other features.
What does that mean in my case? Do I have to install, i.e. enter e.g. "runtime-tokio" as an additional dependency in my Cargo.toml or does sqlx already come with "runtime-tokio"?
BTW what are cfg-attributes?