Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove crate feature

I'm loading a crate in my project and this crate has a feature called object-pooling that is not thread safe. Someone suggested I remove this functionality from the crate but I don't know how to do that. Is there a special entry that I can add to my Cargo.toml file and disables features from dependencies?

like image 904
Romeo Mihalcea Avatar asked Oct 19 '25 15:10

Romeo Mihalcea


1 Answers

The syntax in your CARGO.TOML is:

crate_name = {version="version_numer", features=[feature1, feature2]}

If you want or don't want to have a specific feature you can adapt the features list.

Check out the crates documentation or sourcecode if you want to know which features provide which functionality.

You can find the available features of your specific crate here: https://github.com/brave/adblock-rust/blob/master/Cargo.toml#L86

like image 189
Yannick Funk Avatar answered Oct 21 '25 07:10

Yannick Funk