-
Notifications
You must be signed in to change notification settings - Fork 90
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
Simple api on Windows #314
Conversation
f3fd055
to
174d545
Compare
@jsturtevant PTAL, let me know if something like this makes sense for Windows, or if there's something fundamentally wrong. |
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.
This looks great, This greatly simplifies the work a shim implementor will need to do to support both platforms. I believe this will work for Windows even with our discussion around the differences between launching new process on Windows/Linux.
default = [] | ||
libcontainer_default = ["libcontainer/default"] |
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.
This would mean that shim-implementors would be required to use libcontainer
? Should the Instance
api still be available for workloads that don't want to use libcontainer? Is that a scenario we should support?
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.
It would be a required dependency in Linux, only.
You can still choose not to use it by using the Instance
API instead of the Engine
API.
The main downside of this is that we are forcing downstream dependencies to build libcontianer even if they don't use it. The linker should be smart enough to remove almost every trace of libcontainer from the final binary (except for the error definitions).
The main motivation for this is that the features system is not great with system dependent branching, and the number of combinations we have to handle grows exponentially.
But I'm open to suggestions
dae6ec0
to
612a79d
Compare
Signed-off-by: Jorge Prendes <[email protected]>
Signed-off-by: Jorge Prendes <[email protected]>
Signed-off-by: Jorge Prendes <[email protected]>
612a79d
to
cb94bee
Compare
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.
lgtm!
@@ -20,26 +20,26 @@ homepage = "https://github.com/containerd/runwasi" | |||
|
|||
[workspace.dependencies] | |||
anyhow = "1.0" | |||
cap-std = "1.0" |
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.
Just curious - are you using some script to sort the deps?
This PR adds the skeleton to make the simple API available on windows.
The actual implementation is still
todo!()
, but this change allows us to unify the implementation of the shim binaries.