-
Notifications
You must be signed in to change notification settings - Fork 305
Closed
Description
We should create release packages from this repository for WIT definitions. This will aid in discovery and many different tools will soon be compliant with the OCI artifact layout for Wasm components.
Example of how the mechanics may work:
cargo install wit
cd preview2/io
wit init
wit build
# view built wasm and observe doc comments are preserved
# and it defines an `imports` world
wasm-tools component wit io.wasm
# push the .wasm artifact as an OCI artifact
# TODO wasm-pkg-tools crate to push
# I used wash to demonstrate:
wash push ghcr.io/ricochet/io:0.2.0 io.wasm --world imports
# on @thomastaylor312 branch of [wasm-pkg-loader](https://github.com/bytecodealliance/wasm-pkg-tools/pull/28)
wasm-pkg-loader ricochet:io fetch 0.2.0
Fetching release details for ricochet:io@0.2.0...
Downloading content to "ricochet-io-0.2.0.wasm"...
# inspect again
wasm-tools component wit ricochet-io-0.2.0.wasm
# confirm identical and correct wit definition
The WIT-only component that I pushed: https://github.com/users/ricochet/packages/container/package/io
Note that the maintainers of wasm-pkg-tools and cargo-component are planning a refactor in this space soon for the tooling, but the OCI definition will not change.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels