Useful WebAssembly Tools
Beyond the wasmCloud toolchain, the WebAssembly community maintains many open source projects that are invaluable for Wasm users. This is a non-comprehensive list of tools we've found particularly useful.
WIT Syntax Highlighting
Syntax highlighting can make WIT definitions easier to read and bring a more legible WIT experience to your IDE. Here are a few options for syntax highlighting in popular editors:
VS Code WIT Syntax Highlighting
The VSCode extension maintained by the Bytecode Alliance can be installed either via the extensions marketplace or manually.
VS Code Extension Manual installation
For a manual install, you will need npm
. Run:
git clone https://github.com/bytecodealliance/vscode-wit.git && cd vscode-wit
npm ci && npm run install-plugin
Neovim WIT Syntax Highlighting
The tree-sitter-wit Tree-sitter parser maintained by liamwh can be installed with nvim-treesitter. Installation instructions can be found on either of the two linked repositories.
WebAssembly artifact manipulation with wasm-tools
Sometimes you might want to observe or manipulate a component independently of wasmCloud—perhaps to view the component's WIT interface, compose Wasm components into one, or even for more niche jobs like converting a WebAssembly module to a component. The wasm-tools
CLI tool is a utility belt with a long list of options.
You will need Rust and cargo
. Install wasm-tools
by running:
cargo install wasm-tools
A standalone WebAssembly runtime: Wasmtime
Wasmtime is the WebAssembly runtime used by the wasmCloud host. If you'd like to test a component against standalone Wasmtime or explore runtime features, you can also install Wasmtime locally and use it to run components.
To install on Linux or macOs run:
curl https://wasmtime.dev/install.sh -sSf | bash
Virtualize components with WASI Virt
WASI Virt allows you to encapsulate a virtualized component within another component. This is particularly useful when you want to use potentially sensitive WASI APIs such as Sockets and Filesystem but don't want to give them access to core operating system interfaces.
WASI Virt requires the nightly release channel for Rust:
rustup toolchain install nightly
Install the wasi-virt
command line tool with cargo
:
cargo +nightly install --git https://github.com/bytecodealliance/wasi-virt
Learn more about using WASI Virt with wasmCloud on the Virtualize developer page.
Combine components with WebAssembly Compositions (WAC)
WAC is a powerful CLI tool for declaratively composing components, enabling you to link components at build. WAC uses a superset of WIT called WAC to describe component relationships. You can learn how to use the WAC language in the WAC language guide.
WAC requires Cargo. Once you've installed Cargo:
cargo install wac-cli