runwasi
runwasi copied to clipboard
Add ability to generate new artifact type
The CNCF wg-wasm has published an OCI artifact format for packaging wasm modules and components. The artifact can be produced locally by running the --as-artifact flag:
cargo run --bin oci-tar-builder -- --name wasi-demo-oci --repo ghcr.io/containerd/runwasi --tag latest --as-artifact --module ./target/wasm32-wasi/debug/wasi-demo-app.wasm -o target/wasm32-wasi/debug/img-oci-artifact.tar
regctl image import localhost:5000/wasi-artifact:latest target/wasm32-wasi/debug/img-oci-artifact.tar
regctl manifest get localhost:5000/wasi-artifact:latest
Name: localhost:5000/wasi-artifact:latest
MediaType: application/vnd.oci.image.manifest.v1+json
Digest: sha256:7c31e635b3bef8b6c727a316e9a2dae777dbd184318d66a97da040fb11e37d70
Annotations:
io.containerd.image.name: ghcr.io/containerd/runwasi/wasi-demo-oci:latest
org.opencontainers.image.ref.name: latest
Total Size: 2.006MB
Config:
Digest: sha256:24f30be41b447bbaf3644dad1e1c23dd28b597f36a5f455399657d65945816ea
MediaType: application/vnd.wasm.config.v0+json
Size: 235B
Layers:
Digest: sha256:0db51ed1c94837f422b2259c473758f298eef69605eaae6195bc043e25971e94
MediaType: application/wasm
Size: 2.006MB
Note: this does not add support to runwasi to run these yet. Some work in Containerd is required: https://github.com/containerd/containerd/issues/10179