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

Support for Wasm OCI Artifacts #10179

Open
jsturtevant opened this issue May 6, 2024 · 2 comments
Open

Support for Wasm OCI Artifacts #10179

jsturtevant opened this issue May 6, 2024 · 2 comments

Comments

@jsturtevant
Copy link
Contributor

What is the problem you're trying to solve

Run WASM OCI artifact workloads in Containerd

The CNCF wasm working group has been working on defining an OCI artifact that will enable storing WASM workloads that will work across Wasm and Container Runtimes. The first version of the recommendations are published at https://tag-runtime.cncf.io/wgs/wasm/deliverables/wasm-oci-artifact/

In the Runwasi, we see this as the way forward for small, cross platform WASM and have been using OCI images with WASM layers, https://github.com/containerd/runwasi?tab=readme-ov-file#demo-2-using-oci-images-with-custom-wasm-layers. We would like to start to use this new artifact as tools like wasm's Warg registry will begin using it.

Describe the solution you'd like

Adding logic to containerd that will:

  • recognize the Wasm OCI Artifact type application/vnd.wasm.config.v0+json
  • pull the wasm layers into the containerd content store
  • Set up a scratch container storage layer
  • pass information to the shim about the layers pulled

In the future, it would be nice to be able to have a plug-in system that can pre-compile/compose wasm/etc components.

Additional context

The previous attempt at this was via annotations, and the initial feedback was we needed more clarity on the naming.

The current solution in runwasi is based on #9142 and requires the shim to talk back to containerd to load the layer properly. By adding knowledge of the Artifact type directly into container we can simplify and speed up the loading of the Wasm layers.

@dims
Copy link
Member

dims commented May 6, 2024

@jsturtevant where is application/vnd.wasm.config.v0+json defined? (in a spec somewhere?)

@jsturtevant
Copy link
Contributor Author

defined in https://tag-runtime.cncf.io/wgs/wasm/deliverables/wasm-oci-artifact/ along with other fields/types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants