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

Build the C API with meson rather than cargo-c #108

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

tylerfanelli
Copy link
Member

Rather than using cargo-c and building with pkg-config, we can directly incorporate the meson build system to build the library's C API. In doing this, projects using meson will be able to "wrap" the library and directly link with their projects.

@auto-assign auto-assign bot requested a review from ryansavino October 4, 2023 04:19
@tylerfanelli tylerfanelli marked this pull request as draft October 4, 2023 04:56
@tylerfanelli tylerfanelli force-pushed the meson branch 6 times, most recently from 24a058f to 66d4ffd Compare October 4, 2023 19:34
The unsigned int type seems more reasonable, as the size of the
attestation report should fit in 4 bytes.

Signed-off-by: Tyler Fanelli <[email protected]>
Rather than using cargo-c and building with pkg-config, we can directly
incorporate the meson build system to build the library's C API. In
doing this, projects using meson will be able to "wrap" the library and
directly link with their projects.

Signed-off-by: Tyler Fanelli <[email protected]>
@tylerfanelli tylerfanelli marked this pull request as ready for review October 10, 2023 02:07
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
@larrydewey
Copy link
Contributor

Also, there are some linting errors which need to be patched.

@tylerfanelli tylerfanelli force-pushed the meson branch 2 times, most recently from 90137fa to 11d0a83 Compare October 25, 2023 21:18
The SEV launch C APIs use the launch::sev module, which requires the sev
feature enabled.

Signed-off-by: Tyler Fanelli <[email protected]>
@tylerfanelli
Copy link
Member Author

@larrydewey Can you re-review?

@tylerfanelli tylerfanelli merged commit 5204987 into virtee:main Oct 26, 2023
11 checks passed
@@ -21,13 +21,18 @@ maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "virtee/sev" }
is-it-maintained-open-issues = { repository = "virtee/sev" }

[lib]
crate-type = ["staticlib", "dylib", "rlib"]

Choose a reason for hiding this comment

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

What's the idea of dylib here? Unfortunately it breaks builds with panic="abort".

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, dylib is really for macOS which isn't really a concern here. I think it's safe to remove this. @larrydewey do you agree?

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