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

[rfc] Add simplified libcontainer instance API #250

Closed
wants to merge 1 commit into from

Conversation

jprendes
Copy link
Collaborator

DO NOT MERGE

The intention of this PR is to receive feedback on a proposed simplified API when using libcontainer.

This API introduces an Engine trait fulfilling a similar role to the libcontainer's Executor trait.
To implement a new runtime, just implement the Engine trait. See the changes to the wasmedge shim.

@jprendes jprendes force-pushed the simple-api branch 2 times, most recently from 243c034 to da9b050 Compare August 18, 2023 16:56
ENGINE_NAME
}

fn run(&self, ctx: RuntimeContext, _spec: &Spec) -> anyhow::Result<i32> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like how this new interface makes the shim implementors only need to know about their particular runtime and how to configure it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you think we could use a similar API for windows?
i.e., do the normal setup for a windows container, and then let the implementor run the runtime inside the container.

@Mossaka
Copy link
Member

Mossaka commented Aug 22, 2023

Need a rebase

@Mossaka
Copy link
Member

Mossaka commented Aug 28, 2023

Would you like to talk about this RFC on tomorrow's CG meeting? @jprendes

@jprendes
Copy link
Collaborator Author

Yep, that's a good plan :-)

@Mossaka
Copy link
Member

Mossaka commented Aug 28, 2023

Cool, I've added it to the agenda

@jprendes jprendes force-pushed the simple-api branch 3 times, most recently from 2fad87b to 2d024ed Compare August 30, 2023 12:26
@jprendes jprendes closed this Aug 30, 2023
@jprendes jprendes reopened this Aug 30, 2023
@jprendes jprendes force-pushed the simple-api branch 2 times, most recently from 2fdd23f to 8d8b9e8 Compare August 31, 2023 22:51
@jprendes jprendes force-pushed the simple-api branch 9 times, most recently from ff97934 to 301363d Compare September 2, 2023 00:40
@jprendes jprendes force-pushed the simple-api branch 3 times, most recently from dbd7c47 to 1c5b80a Compare September 2, 2023 00:50
@jprendes jprendes closed this Sep 2, 2023
@jprendes jprendes reopened this Sep 2, 2023
@jprendes jprendes force-pushed the simple-api branch 2 times, most recently from 8c409b7 to cd8026c Compare September 4, 2023 13:45
@jprendes jprendes marked this pull request as ready for review September 4, 2023 13:54
@jprendes jprendes marked this pull request as draft September 4, 2023 13:54
@jprendes jprendes closed this Sep 4, 2023
@jprendes jprendes reopened this Sep 4, 2023
@jprendes jprendes force-pushed the simple-api branch 2 times, most recently from 8abfe99 to 60c0f81 Compare September 4, 2023 14:14
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
@jprendes
Copy link
Collaborator Author

jprendes commented Sep 4, 2023

Closing in favor of #293

@jprendes jprendes closed this Sep 4, 2023
@Mossaka Mossaka mentioned this pull request Sep 5, 2023
@jprendes jprendes mentioned this pull request Sep 11, 2023
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.

Experiment with the Libcontainer trait for build_container to something like open_stdio
3 participants