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

attestation-service: Allow conditional compilation of some features #565

Merged

Conversation

tylerfanelli
Copy link
Contributor

@tylerfanelli tylerfanelli commented Nov 7, 2024

The Makefile is a bit strict on conditional compilation. Add some conditional verifier compilation in Cargo.toml and introduce a new configurable FEATURES variable to specify feature compilation other than default features.

The verifier/all-verifier option is already enabled with the default
build. Yet, if a user wants to optionally compile with a subset of
verifiers, they cannot due so unless disabling the all-verifier feature
in the dependency.

Signed-off-by: Tyler Fanelli <[email protected]>
Supplying a FEATURES argument to the attestation service's Makefile can
conditionally compile features into the build. The FEATURES argument
will disable default features and instead supply the selected features.

For example `FEATURES=restful-bin,rvps-grpc,snp-verifier make grpc-as`
will expand to:

cargo build --bin grpc-as --release \
                        --no-default-features \
                        --features grpc-bin,restful-bin,rvps-grpc,snp-verifier

Signed-off-by: Tyler Fanelli <[email protected]>
@tylerfanelli tylerfanelli requested a review from a team as a code owner November 7, 2024 04:26
Copy link
Member

@Xynnn007 Xynnn007 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@fitzthum fitzthum merged commit 59c7b85 into confidential-containers:main Nov 7, 2024
15 checks passed
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.

4 participants