{"id":13693281,"url":"https://github.com/engineerd/wasm-to-oci","last_synced_at":"2025-06-13T01:40:31.151Z","repository":{"id":38329302,"uuid":"210919941","full_name":"engineerd/wasm-to-oci","owner":"engineerd","description":"Use OCI registries to distribute Wasm modules","archived":false,"fork":false,"pushed_at":"2023-02-07T14:48:55.000Z","size":4015,"stargazers_count":255,"open_issues_count":14,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-12T19:41:12.259Z","etag":null,"topics":["oci-registries","tuf","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Go","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/engineerd.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}},"created_at":"2019-09-25T19:04:58.000Z","updated_at":"2024-11-10T22:21:34.000Z","dependencies_parsed_at":"2023-02-19T05:31:30.117Z","dependency_job_id":null,"html_url":"https://github.com/engineerd/wasm-to-oci","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineerd%2Fwasm-to-oci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineerd%2Fwasm-to-oci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineerd%2Fwasm-to-oci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineerd%2Fwasm-to-oci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engineerd","download_url":"https://codeload.github.com/engineerd/wasm-to-oci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252108869,"owners_count":21696154,"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":["oci-registries","tuf","wasm","webassembly"],"created_at":"2024-08-02T17:01:07.910Z","updated_at":"2025-05-02T21:31:50.649Z","avatar_url":"https://github.com/engineerd.png","language":"Go","funding_links":[],"categories":["Go","工具(库)"],"sub_categories":["其他"],"readme":"# WASM to OCI\n\nThe goal of this project is to propose an implementation of storing WebAssembly\nmodules in OCI registries.\n\nThis project is built with the [ORAS project](https://oras.land/oras-go), and\ncurrently works with:\n\n- [Distribution (open source, version 2.7+)](https://github.com/docker/distribution)\n- [Azure Container Registry](https://docs.microsoft.com/en-us/azure/container-registry/)\n- [Google Container Registry](https://cloud.google.com/container-registry/)\n- [Google Artifact Registry](https://cloud.google.com/artifact-registry)\n- [Harbor Container Registry v2.0](https://github.com/goharbor/harbor/releases/tag/v2.0.0)\n- [Bundle Bar](https://bundle.bar/docs/supported-clients/wasm-to-oci/)\n- [GitHub Package Registry](https://github.com/features/packages)\n\n\u003e Note that trying to push a WebAssembly module to Docker Hub is not supported\n\u003e at the time of writing this document, as Docker Hub does _not_ accept unknown\n\u003e artifact types.\n\n\u003e As more registries add support for OCI Artifacts, we will update the list of\n\u003e supported registries.\n\n# Installation\n\nPre-built binaries for macOS, Linux, and Windows are available in [Releases](https://github.com/engineerd/wasm-to-oci/releases). Download the pre-built binary for your operating system and add it to your path.\n\nThe following example shows adding the Linux binary to your path in Linux.\n\n```bash\nmv linux-amd64-wasm-to-oci wasm-to-oci\nchmod +x wasm-to-oci\nsudo cp wasm-to-oci /usr/local/bin\n```\n# Usage\n\n- login to your container registry using the `docker` CLI (or other tooling that\n  your container registry provides. `wasm-to-oci` will use the credentials in\n  `~/.docker/config.json`)\n\n- pushing to an OCI registry:\n\n```\n$ ls testdata\n.rwxr-xr-x 4.1M radu canonicaljson.wasm\n.rwxr-xr-x 1.6M radu  hello.wasm\n\n$ wasm-to-oci push testdata/hello.wasm \u003coci-registry\u003e.azurecr.io/wasm-to-oci:v1\n\nPushed: \u003coci-registry\u003e.azurecr.io/wasm-to-oci:v1\nSize: 1624962\nDigest: sha256:9c82cbe576ee947c00435ac8053a800a1969f4757ae4a81f870f714674afc91a\n```\n\n- pulling from an OCI registry:\n\n```\n$ wasm-to-oci pull \u003coci-registry\u003e.azurecr.io/wasm-to-oci:v1 --out test.wasm\n\nPulled: \u003coci-registry\u003e.azurecr.io/wasm-to-oci:v1\nSize: 1624962\nDigest: sha256:4c7915b4c1f9b0c13f962998e4199ceb00db39a4a7fa4554f40ae0bed83d9510\n\n$ wasmtime test.wasm\nHello from WebAssembly!\n```\n\n# How does this work?\n\nThis leverages\n[the OCI Artifacts proposal](https://github.com/opencontainers/artifacts), whose\ngoal is to enable the distribution of more cloud native artifacts using existing\nregistry infrastructure, and uses it to store WebAssembly modules as single\nlayer blobs in the registry.\n\nThis project defines a new set of _unofficial_ media types used to identify a\nWebAssembly artifact - the artifacts project also describes the process for\nprojects to\n[apply for an official unique media type](https://github.com/opencontainers/artifacts/blob/master/artifact-authors.md#registering-unique-types-with-iana).\n\n```json\n{\n  \"schemaVersion\": 2,\n  \"config\": {\n    \"mediaType\": \"application/vnd.wasm.config.v1+json\",\n    \"digest\": \"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a\",\n    \"size\": 2\n  },\n  \"layers\": [\n    {\n      \"mediaType\": \"application/vnd.wasm.content.layer.v1+wasm\",\n      \"digest\": \"sha256:4c7915b4c1f9b0c13f962998e4199ceb00db39a4a7fa4554f40ae0bed83d9510\",\n      \"size\": 1624962\n    }\n  ]\n}\n```\n\nThere is also experimental support for artifact signing with Notary v1 - see\n[this article](https://radu-matei.com/blog/wasm-oci-tuf/) for more background on\nthis topic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineerd%2Fwasm-to-oci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineerd%2Fwasm-to-oci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineerd%2Fwasm-to-oci/lists"}