{"id":13693199,"url":"https://github.com/deislabs/containerd-wasm-shims","last_synced_at":"2025-04-05T08:07:21.530Z","repository":{"id":58872794,"uuid":"528422213","full_name":"deislabs/containerd-wasm-shims","owner":"deislabs","description":"containerd shims for running WebAssembly workloads in Kubernetes","archived":false,"fork":false,"pushed_at":"2024-06-21T22:44:04.000Z","size":1814,"stargazers_count":324,"open_issues_count":21,"forks_count":50,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T07:06:42.077Z","etag":null,"topics":["containerd","kubernetes","wasi","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deislabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-24T12:50:49.000Z","updated_at":"2025-03-20T08:48:09.000Z","dependencies_parsed_at":"2023-09-22T05:32:23.381Z","dependency_job_id":"2430b405-5973-4faf-a349-1e333e603571","html_url":"https://github.com/deislabs/containerd-wasm-shims","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fcontainerd-wasm-shims","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fcontainerd-wasm-shims/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fcontainerd-wasm-shims/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fcontainerd-wasm-shims/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deislabs","download_url":"https://codeload.github.com/deislabs/containerd-wasm-shims/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305934,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerd","kubernetes","wasi","wasm","webassembly"],"created_at":"2024-08-02T17:01:06.854Z","updated_at":"2025-04-05T08:07:21.502Z","avatar_url":"https://github.com/deislabs.png","language":"Rust","funding_links":[],"categories":["Rust","优秀项目与工具","Runtimes \u0026 Platforms"],"sub_categories":["Containerd \u0026 WASM"],"readme":"# Containerd Wasm Shims\n\nThis project aims to provide containerd shim implementations that can run [Wasm](https://webassembly.org/) / [WASI](https://github.com/WebAssembly/WASI) workloads using [runwasi](https://github.com/deislabs/runwasi) as a library. This means that by installing these shims onto Kubernetes nodes, we can add a [runtime class](https://kubernetes.io/docs/concepts/containers/runtime-class/) to Kubernetes and schedule Wasm workloads on those nodes. Your Wasm pods and deployments can act just like container workloads!\n\n[runwasi](https://github.com/deislabs/runwasi) is a project that aims to run WASI workloads managed by [containerd](https://containerd.io/).\n\n## Shims\n\n\u003e We are moving the spin shim to a separate repository, follwoing the annoucement of SpinKube project. Please check out the [SpinKube](https://github.com/spinkube) organization for the latest updates on the Spin shim.\n\nThis repo currently maintains four shims for Wasm application runtimes/frameworks:\n\n1. [Spin](https://github.com/fermyon/spin) - a developer tool for building and running serverless Wasm applications.\n2. [Slight](https://github.com/deislabs/spiderlightning) - a wasmtime-based runtime for running Wasm applications that use SpiderLightning (aks [WASI-Cloud-Core](https://github.com/WebAssembly/wasi-cloud-core)) capabilities\n3. [Wasm Workers Server](https://github.com/vmware-labs/wasm-workers-server) - a tool to develop and run serverless applications server on top of Wasm.\n4. [Lunatic](https://github.com/lunatic-solutions/lunatic) - an Erlang-inspired runtime for fast, robust and scalable server-side Wasm applications.\n\nBelow is a table of the shims and the the most recent versions of the shims that are supported by this project.\n\n| **shim version** | v0.11.1                                                                          | v0.10                                                                            | v0.9                                                                             | v0.8                                                                             | v0.7                                                                             | v0.5.1                                                                    | v0.5.0                                                                    |\n| ---------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |\n| **[Spin](https://github.com/fermyon/spin)**         | [v2.2.0](https://github.com/fermyon/spin/releases/tag/v2.2.0)                    | [v2.0.1](https://github.com/fermyon/spin/releases/tag/v2.0.1)                    | [v1.4.1](https://github.com/fermyon/spin/releases/tag/v1.4.1)                    | [v1.4.0](https://github.com/fermyon/spin/releases/tag/v1.4.0)                    | [v1.3.0](https://github.com/fermyon/spin/releases/tag/v1.3.0)                    | [v1.0.0](https://github.com/fermyon/spin/releases/tag/v1.0.0)             | [v0.9.0](https://github.com/fermyon/spin/releases/tag/v0.9.0)             |\n| **[Slight](https://github.com/deislabs/spiderlightning)**       | [v0.5.1](https://github.com/deislabs/spiderlightning/releases/tag/v0.5.1)        | [v0.5.1](https://github.com/deislabs/spiderlightning/releases/tag/v0.5.1)        | [v0.5.1](https://github.com/deislabs/spiderlightning/releases/tag/v0.5.1)        | [v0.5.0](https://github.com/deislabs/spiderlightning/releases/tag/v0.5.1)        | [v0.5.0](https://github.com/deislabs/spiderlightning/releases/tag/v0.5.0)        | [v0.4.0](https://github.com/deislabs/spiderlightning/releases/tag/v0.4.0) | [v0.4.0](https://github.com/deislabs/spiderlightning/releases/tag/v0.4.0) |\n| **[Wasm Workers Server](https://github.com/vmware-labs/wasm-workers-server)**          | [v1.7.0](https://github.com/vmware-labs/wasm-workers-server/releases/tag/v1.7.0) | [v1.7.0](https://github.com/vmware-labs/wasm-workers-server/releases/tag/v1.7.0) | [v1.5.0](https://github.com/vmware-labs/wasm-workers-server/releases/tag/v1.5.0) | [v1.4.0](https://github.com/vmware-labs/wasm-workers-server/releases/tag/v1.4.0) | [v1.2.0](https://github.com/vmware-labs/wasm-workers-server/releases/tag/v1.2.0) | /                                                                         | /                                                                         |\n| **[Lunatic](https://github.com/lunatic-solutions/lunatic)**      | [v0.13.2](https://github.com/lunatic-solutions/lunatic/releases/tag/v0.13.2)     | [v0.13.2](https://github.com/lunatic-solutions/lunatic/releases/tag/v0.13.2)     | /                                                                                | /                                                                                | /                                                                                | /                                                                         | /                                                                         |\n\n## Compare to `runwasi` shims\n\nAs mentioned above, this project uses runwasi's `containerd-shim-wasm` to build shim implementations for higher level Wasm application runtimes/frameworks. The `runwasi` shims are more lower level that are intended to run WASI-compatible Wasm modules, instead of Wasm applications that are built on top of a framework. If you are looking for `Wasmtime`, `WasmEdge` or `Wasmer` shims, please check out [runwasi](https://github.com/deislabs/runwasi).\n\n## Quickstarts\n\n- [Start k3d and run a sample WASM application](./deployments/k3d/README.md#how-to-run-the-example).\n- [Create a Spin application on k3d](./containerd-shim-spin/quickstart.md)\n- [Deploy a SpiderLightning application with k3d](./containerd-shim-slight/quickstart.md)\n- [Deploy a Wasm Workers Server application with k3d](./containerd-shim-wws/quickstart.md)\n\n### Building the shims\n\nTo build the shims in this project, run `make build`.\n\n### Running the integration tests\n\nTo run the integration tests, run `make integration-tests`.\n\nTo clean up, run `make tests/clean`.\n\n## Example Kubernetes Cluster Deployments\n\nIn [the deployments directory](deployments) you will find examples of deploying the shims to Kubernetes clusters and using them in example Kubernetes workloads.\n\n## Using a shim in Kubernetes\n\nTo use one of these containerd shims in Kubernetes, you must do the following:\n\n1. Install the shim binary somewhere on the path of your Kubernetes worker nodes. For example, copy `containerd-shim-spin-v2` to `/bin`.\n2. Add the following to the containerd config.toml that maps the runtime type to the shim binary from step 1.\n\n```toml\n[plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.spin]\n  runtime_type = \"io.containerd.spin.v2\"\n```\n\n3. Apply a runtime class that contains a handler that matches the \"spin\" config runtime name from step 2.\n\n```yaml\napiVersion: node.k8s.io/v1\nkind: RuntimeClass\nmetadata:\n  name: wasmtime-spin\nhandler: spin\n```\n\n4. Deploy a Wasm workload to your cluster with the specified runtime class name matching the \"wasmtime-spin\" runtime class from step 3.\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: wasm-spin\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: wasm-spin\n  template:\n    metadata:\n      labels:\n        app: wasm-spin\n    spec:\n      runtimeClassName: wasmtime-spin\n      containers:\n        - name: spin-hello\n          image: ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:latest\n          command: [\"/\"]\n```\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of\nConduct](https://opensource.microsoft.com/codeofconduct/).\n\nFor more information see the [Code of Conduct\nFAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact\n[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fcontainerd-wasm-shims","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeislabs%2Fcontainerd-wasm-shims","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fcontainerd-wasm-shims/lists"}