flâneur — a map of the web's best reading

Features - The Cargo Book

doc.rust-lang.org · 3,009 words · saved by 1 readers

Cargo “features” provide a mechanism to express conditional compilation and optional dependencies. A package defines a set of named features in the [features] table of Cargo.toml, and each feature can either be enabled or disabled. Features for the package being built can be enabled on the command-line with flags such as --features. Features for dependencies can be enabled in the dependency declaration in Cargo.toml. Note: New crates or versions published on crates.io are now limited to a maximum of 300 features. Exceptions are granted on a case-by-case basis. See this blog post for details. Participation in solution discussions is encouraged via the crates.io Zulip stream. See also the Features Examples chapter for some examples of how features can be used. Features are defined in the [features] table in Cargo.toml. Each feature specifies an array of other features or optional dependencies that it enables. The following examples illustrate how features could be used for a 2D image pro

Features - The Cargo Book Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Cargo Book Features Cargo “features” provide a mechanism to express conditional compilation and optional dependencies . A package defines a set of named features in the [features] table of Cargo.toml , and each feature can either be enabled or disabled. Features for the package being built can be enabled on the command-line with flags such as --features . Features for dependencies can be

Explore this link on the map →

related reading