Skip to main content
Version: v2

Wasm Shell and OCI Registries

Wasm Shell enables component developers to push WebAssembly components to Open Container Initiative (OCI) registries as standard OCI artifacts, and to pull component artifacts from registries.

OCI artifacts include a wide range of content types such as WebAssembly components, Software Bill of Materials (SBOMs), and Helm charts as well as container images.

Authenticating to OCI registries

wash supports loading Docker credentials. There are multiple ways to authenticate with Docker credentials, including the docker login command with the docker CLI:

shell
docker login <registry> -u <username> -p <password-or-token> 

How to push a WebAssembly component to an OCI registry

Push the component to your registry:

shell
wash oci push ghcr.io/cosmonic-labs/components/hello:0.2.0 ./dist/http-hello-world.wasm
  • The target registry address (including artifact name and tag) are specified for the first option with wash oci push.
  • The second option defines the target path for the component binary to push.

How to pull a WebAssembly component from an OCI registry

Pull the component from your registry:

shell
wash oci pull ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0

wasmCloud first-party WIT interfaces

Starting in wasmCloud 2.2, the project's first-party WIT packages are published to GitHub Container Registry at ghcr.io/wasmcloud/interfaces/<name>:<version>. Each package is built with wash wit build, has provenance embedded via wasm-tools metadata add, and ships with a GitHub attestation that the publish workflow attaches at release time. Stable version tags are immutable — re-pushing an existing tag is a no-op — so consumers can pin to a specific version with confidence.

Available today:

  • ghcr.io/wasmcloud/interfaces/wasmcloud-messaging
  • ghcr.io/wasmcloud/interfaces/wasmcloud-secrets

Additional interfaces will follow as the project-root inventory grows. To pull one into a wash project, add it as a WIT dependency in .wash/config.yaml:

yaml
wit:
  registries:
    - url: "ghcr.io/wasmcloud/interfaces"
  sources:
    "wasmcloud:messaging": "ghcr.io/wasmcloud/interfaces/wasmcloud-messaging:0.2.0"

Or fetch a package directly with the OCI client of your choice (e.g. wkg, oras).

Further reading