All Projects → Riey → cargo-feature

Riey / cargo-feature

Licence: MIT license
Cargo plugin to manage dependency features

Programming Languages

rust
11053 projects
Nix
1067 projects

cargo-feature

CI Crates.io

Packaging status

preview

Install

Cargo

cargo install cargo-feature

Arch

pacman -Syu cargo-feature

NixOS

nix-env -iA nixos.cargo-feature

Usage

# add serde_derive feature to build-dependency of serde
cargo feature -t build serde +serde_derive

# disable default-features
cargo feature serde ^default

# same as above but more explict
cargo feature serde --disable-default-features

# if you want list all features, just type crate name
cargo feature serde

# enable default-features
cargo feature serde default

# same as above but more explict
cargo feature serde --enable-default-features

# add HtmlDivElement feature to dependency of web_sys 
cargo feature web_sys +HtmlDivElement

# you can skip typing +
cargo feature web_sys HtmlDivElement

# same as above but use `target.'cfg(target_arch = "wasm32")'.dependencies`
cargo feature --target="cfg(target_arch = \"wasm32\")" web_sys HtmlDivElement

# use `^` to remove feature
cargo feature web_sys ^HtmlDivElement
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].