Skip to content
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

Add support to add features during cargo build #31

Closed
wants to merge 2 commits into from

Conversation

Hasan6979
Copy link
Collaborator

This PR aims to enable having custom feature builds.

Motivation comes from resolving this NordSecurity/libtelio#529 (comment), where having a compile time flag seems a better option than passing a feature into telio.

Comment on lines +42 to +44
def add_features(self, features: List[str]):
self.features = features

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we even need this method

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that ?

Copy link

@stalowyjez stalowyjez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+0.5, looks reasonable, but I'm not really that familiar with this project

@@ -38,6 +39,9 @@ def __post_init__(self):
def is_msvc(self):
return self.rust_target.endswith("-msvc")

def add_features(self, features: List[str]):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think add implies that the features will be appended, here they are substituted, so I would use set_features

@Hasan6979 Hasan6979 closed this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants