-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing of enabled features to cargo build #77
Allow passing of enabled features to cargo build #77
Conversation
Allow passing of enabled features to cargo build
Added changelog item.
@@ -322,6 +323,11 @@ def cargo_build( | |||
additional_args.append(crate) | |||
if mode == "release": | |||
additional_args.append("--release") | |||
if features: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of interest, why are you seeking to enable these features in Kraken, rather than making them be default features in the root project. Basically, what's the use case for this functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morosanmihail, I am keen to understand the use case as well :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capturing for posterity: this would be useful to enable platform-specific features (a workaround exists, but it's not great), as well as to have multiple cargo build tasks to produce variants of a binary, with different features combinations.
This allows cargo_build to take a list of strings (features) to pass onto the build task and enable them during compilation.
Despite some examples online recommending to wrap all comma-separated features in a pair of quotes ("abc, bcd"), the official documentation does not mention this as a requirement. To be revisited if problematic.