Publish your first package
This page will guide you through installing Wasmer, and publishing a package to the Wasmer Registry.
Install Wasmer
Click here for instructions on how to install Wasmer if you haven't done it already!
Create an account
You can create an account directly via wasmer login or via the Wasmer website:
wasmer.io/signup (opens in a new tab)
Create a package
To create your first Wasmer package simply run wasmer init.
This should have created a wasmer.toml file with contents similar to:
[package]
name = '<your-user>/<package>'
version = '0.1.0'
description = 'Description for package'
 
[[module]]
name = '<your-module>'
source = 'target/release/<your-module>.wasm'
 
[[command]]
runner = 'wasi'
name = '<your-module>'
module = '<your-module>'You can check the manifest format here: Wasmer Package Manifest.
The wasmer.toml file is in the Wasmer ecosystem what a package.json is in the Node ecosystem, or pyproject.toml in the Python ecosystem.
Once you have a wasmer.toml manifest, you can simply execute wasmer run in the CLI to run your package locally.
wasmer run . --command=<your-module>Build your package
Now, create your WebAssembly modules:
cargo install cargo-wasix
cargo wasix build --releaseModify wasmer.toml to point the module to the wasm file location target/release/<your-module>.wasm.
Publish your package
Now, simply run:
wasmer publishThis command will publish your package to the Wasmer Registry (opens in a new tab), so it can be used anywhere.