libkrun: Produce a proper Rust library#588
Open
d-e-s-o wants to merge 2 commits intocontainers:mainfrom
Open
Conversation
Contributor
Author
|
Still blocked on rust-vmm/linux-loader#223 or rust-vmm/linux-loader#229 and it being included in a new release. |
5987285 to
c834676
Compare
Contributor
|
I had my 🤖 help me put together a PR describing something I hope we can land before introducing the rust api: #593. The main intent is that we not couple the init into the crate and instead have it as an optional sibling crate. |
The existing version specification for the vm-memory dependency is wrong: it includes incompatible versions that, when used, will break the build. 0.18, for example does not build. Neither does 0.17. We cannot go to 0.18, because linux-loader folks are reluctant to update to 0.18. Hence, move the entire workspace to using vm-memory 0.17. Signed-off-by: Daniel Müller <deso@posteo.net>
Produce a proper Rust library to avoid the need for C library
installation as well as binding generation/definition. Basically, we can
now reference the crate via Cargo.toml:
[dependencies]
libkrun = ...
instead of having to rely on constructs like:
#[link(name = "krun")]
extern "C" {
pub fn krun_create_ctx() -> i32;
...
}
Signed-off-by: Daniel Müller <deso@posteo.net>
Contributor
Author
Doesn't seem as if one of those is going to get merged anytime soon. So we have to stick with vm-memory 0.17. Updated PR accordingly. |
8c40869 to
ac1e901
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Produce a proper Rust library to avoid the need for C library
installation as well as binding generation/definition. Basically, we can
now reference the crate via
Cargo.toml:instead of having to rely on constructs like:
For a brief discussion of the topic, see #494 (comment)