Is it possible to disable one default function in Cargo?

After reading this page , it says that you need to disable all the default values โ€‹โ€‹in order to override them.

With the exception of the default function, all functions are an option. To discard the default function, use default-features = false and individual cherry functions.

Other embedded systems that I used (CMake, SCons, Autotools, Jam) allow you to change one default value.

Is this possible with Cargo?


This is useful because in most cases I want to use the default settings with minor adjustments. It is also important for me that in the future, new functions that, according to developers, should be enabled by default, are not disabled in my assembly, because I decided to configure an unrelated function.

Edit: An open problem with this feature .

+7
source share
2 answers

This is currently not possible, but your motivation sounds reasonable. Ideas for improving Cargo can be presented as โ€œGitHub Issuesโ€ or (for more important things than this) RFCs .

+3
source

Not at present. You must disable all the functions by default, and then select the ones you need again. Thus, you should know what the default list is and discard all but the one you want to omit.

This issue GH describes status and discusses possibilities, but remains open (after 3 years).

0
source

Source: https://habr.com/ru/post/1257353/


All Articles