Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable a single default feature in Cargo?

From reading this page, it states that you need to turn off all defaults to override them.

With the exception of the default feature, all features are opt-in. To opt out of the default feature, use default-features = false and cherry-pick individual features.

Other build systems I've used (CMake, SCons, Autotools, Jam) all allow to change a single default.

Is this possible with Cargo?


This is useful because in most cases I want to use default options, with only minor adjustments. Its also important to me that in the future - new features which the developers think should be enabled by default, are not disabled on my build because I chose to adjust an unrelated feature.

Edit: opened issue regarding this feature.

like image 358
ideasman42 Avatar asked Sep 27 '16 21:09

ideasman42


1 Answers

This is not currently possible, but your motivation sounds reasonable. Ideas for improvements to Cargo can be submitted as GitHub issues or (for more major things than this) RFCs.

like image 152
durka42 Avatar answered Sep 28 '22 09:09

durka42