Getting started

Run your first WebAssembly module

Install the Linux or Windows CLI in one command and run your first WebAssembly module.

Install on Linux

Supports Linux x86_64 and ARM64, including glibc and musl distributions. You need Bash, curl, tar, gzip, and sha256sum; no Rust toolchain is required; sudo is used when system-directory permissions require it. The installer downloads the matching static binary from liusha-com/wasmd, verifies SHA-256, and installs it to /usr/local/bin. The default installation does not edit shell startup files.

curl -fsSL https://wasmd.com/install | bash
wasmd --version

Install on Windows

Run this command in PowerShell 5.1 or newer on Windows x64 with tar.exe available (included in current Windows 10/11). The installer downloads the official Release, verifies SHA-256 and the binary version, and installs to %USERPROFILE%\.wasmd\bin. It updates your user PATH without administrator access. Open a new terminal after installation. WASMD_INSTALL overrides the installation root; WASMD_NO_MODIFY_PATH=1 skips PATH changes. Run the command again to update.

irm https://wasmd.com/install.ps1 | iex
wasmd --version

Run a module without a compiler

Wasmd also accepts WebAssembly text. Create a tiny module and invoke its exported function; the result is 42.

printf '%s\n' '(module (func (export "answer") (result i32) i32.const 42))' > hello.wat
wasmd run hello.wat --invoke answer

Upgrade Wasmd

Starting with v0.1.1, wasmd upgrade checks the latest stable GitHub release and installs it only if it is newer. It verifies SHA-256 and the executable version, preserving your installation location and runtime data. Use sudo wasmd upgrade if your Linux system directory requires elevated permissions. Users of v0.1.0 must first rerun the installer to obtain this command.

wasmd upgrade
wasmd upgrade --json

Versions, updates, and installation paths

Run the installer again to update to the latest stable release, or pass an exact tag to pin a version. WASMD_INSTALL sets an absolute installation root (default /usr/local, with the binary in bin/); WASMD_NO_MODIFY_PATH=1 leaves shell configuration unchanged. Downloads and runtime checks complete before replacing an existing binary. To uninstall, remove only the CLI binary and its PATH entries; retain Registry settings, cached images, and persistent volumes.

curl -fsSL https://wasmd.com/install | bash -s -- v0.1.1
curl -fsSL https://wasmd.com/install | WASMD_INSTALL="$HOME/.local/wasmd" WASMD_NO_MODIFY_PATH=1 bash

Build from source on other platforms

Install Rust 1.85 or newer and Git. Run these commands in PowerShell. Building from the repository gives you the CLI described in these guides; development capabilities may differ from release archives.

git clone https://github.com/liusha-com/wasmd.git
cd wasmd
cargo build --release --locked -p wasmd-cli
$env:PATH = "$PWD\target\release;$env:PATH"

Compile and run

After cloning the repository in the source-build step, examples/hello.rs is available. Wasmd detects Preview 1 imports automatically and forwards guest stdout and stderr.

rustup target add wasm32-wasip1
rustc --target wasm32-wasip1 -O examples/hello.rs -o hello.wasm
wasmd validate hello.wasm
wasmd run hello.wasm

Set execution boundaries

A timeout bounds execution time; the memory limit is expressed in 64 KiB Wasm pages. Arguments after -- are passed to the guest. Host directories, environment variables, and network access require explicit capabilities.

wasmd run hello.wasm --timeout-ms 5000 --max-memory-pages 4096 -- arg1 arg2
Keep the source in view

Based on the current repository documentation. Check your installed version and the linked acceptance records when adopting development features.

Read the Wasmd source document ↗
Explore all documentation →