wasm-pkg-tools
Tools to package up Wasm Components
This repo contains several Rust crates that can be used for fetching and publishing Wasm Components
to OCI registries. It is also the home of the wkg command line tool, which exposes all the
functionality of the libraries. The first (but not only) focus of this project is allow for fetching
of Wit Interfaces stored as components for use in creating components. It can also be used to fetch
and publish component "libraries" to/from a registry.
Documentation
- Install
- Quick start
- Configuration (
config.toml) - Registry metadata (
/.well-known) - Manifest (
wkg.toml) - Contributing
- License
Install
Right now installation of wkg is manual. You can either clone the repo and build from source, or
download a pre-built binary from the releases
page and add it to your PATH. In the
future we will add this tool to various package managers. If this is something you'd like to help
with, please feel free to open some PRs!
If you have a Rust toolchain installed, you can also install wkg with one of the following
options:
If you have cargo-binstall installed, you can also
install wkg with a pre-built binary:
Quick start
Set the default registry:
Open the full config file in $EDITOR:
Download a package:
Publish a package to the configured registry:
Fetch WIT dependencies for the current project (uses wkg.toml / wkg.lock):
Update pinned versions in wkg.lock:
Build a WIT package into a component:
Point at a non-default config or cache directory (the --config / --cache flags attach to each
subcommand, not to wkg itself):
Contributing
Want to join us? Check out our "Contributing" guide and take a look at some of these issues:
License
Licensed under Apache-2.0 WITH LLVM-exception
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license with LLVM-exception, shall be licensed as above, without any additional terms or conditions.