LinuxCommandLibrary

wapm

Manage WebAssembly packages

TLDR

Interactively create a new wapm.toml file

$ wapm init
copy

Download all the packages listed as dependencies in wapm.toml
$ wapm install
copy

Download a specific version of a package and add it to the list of dependencies in wapm.toml
$ wapm install [package]@[version]
copy

Download a package and install it globally
$ wapm install --global [package]
copy

Uninstall a package and remove it from the list of dependencies in wapm.toml
$ wapm uninstall [package]
copy

Print a tree of locally installed dependencies
$ wapm list
copy

List top-level globally installed packages
$ wapm list --global
copy

Execute a package command using the Wasmer runtime
$ wapm run [command_name] [arguments]
copy

SYNOPSIS

wapm command [options] [arguments]
Examples:
wapm install package-name[@version]
wapm run package-name[@version] [args...]
wapm publish [path]

PARAMETERS

install
    Installs a WebAssembly package from the WAPM registry.

publish
    Publishes a WebAssembly package to the WAPM registry.

run
    Executes a WebAssembly package or a local Wasm file.

search
    Searches the WAPM registry for available packages.

login
    Authenticates the user with the WAPM registry.

whoami
    Displays the currently logged-in WAPM user.

pack
    Creates a .wapm package from a directory.

help
    Shows help for the wapm command or its subcommands.

DESCRIPTION

wapm is the WebAssembly Package Manager, a command-line interface (CLI) tool designed for installing, publishing, and managing WebAssembly modules and packages. It provides a decentralized registry and a set of tools for the WebAssembly ecosystem, functioning similarly to npm for Node.js or pip for Python. Users can leverage wapm to discover, download, and execute Wasm binaries, as well as to share their own compiled WebAssembly applications or libraries with others. It simplifies the process of distributing and consuming WebAssembly code, fostering reusability and collaboration within the WebAssembly development community. wapm integrates with various WebAssembly runtimes, most notably Wasmer, offering a streamlined experience for developers building modular and portable applications.

CAVEATS

wapm is not a standard Linux utility and must be installed separately. Its functionality is specific to the WebAssembly ecosystem and typically requires a WebAssembly runtime (like Wasmer) to execute packages. It relies on the availability and responsiveness of the WAPM registry for package management.

WAPM REGISTRY

The WAPM Registry is the central repository where WebAssembly packages are stored and retrieved. It acts as a public index for Wasm modules, similar to npmjs.com for JavaScript packages or PyPI for Python.

PACKAGE FORMAT

WAPM packages typically bundle WebAssembly modules (.wasm files) along with metadata (often in a wapm.toml file) that describes the package, its dependencies, and entry points, ensuring portability and reusability.

HISTORY

wapm emerged as a crucial component of the WebAssembly ecosystem, primarily driven by the need for a centralized package management solution as WebAssembly gained traction as a compilation target beyond browser environments. It was developed by Wasmer, Inc., to complement their WebAssembly runtime, Wasmer. The goal was to provide a familiar package manager experience for Wasm developers, simplifying the discovery, distribution, and execution of WebAssembly modules, mirroring similar tools in other programming language ecosystems. Its development parallels the growth of WebAssembly into server-side, CLI, and embedded applications.

SEE ALSO

npm(1), pip(1), cargo(1), wasmer(1)

Copied to clipboard