# 使用 Homebrew, apk, MacPorts, Nix, pacman 安装 wasm-tools

查看 wasm-tools 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:wasm-tools
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install wasm-tools
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install wasm-tools
```

  证据: MacPorts ports tree: devel/wasm-tools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add wasm-tools
```

  证据: Alpine Linux edge package indexes: wasm-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#wasm-tools
```

  证据: nixpkgs package indexes: pkgs/by-name/wa/wasm-tools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S wasm-tools
```

  证据: Arch Linux sync databases: wasm-tools from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:wasm-tools
- **软件包管理器:** Homebrew
- **版本:** 1.255.0
- **来源摘要:** Low level tooling for WebAssembly in Rust
- **主页:** <https://github.com/bytecodealliance/wasm-tools>
- **仓库:** <https://github.com/bytecodealliance/wasm-tools>
- **最后更新:** 2026-07-30T22:48:11Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- wasm-tools (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.255.0
## 项目历史与用法

wasm-tools is the Bytecode Alliance's Rust-based command-line toolbox and library collection for low-level manipulation of WebAssembly modules and components. It bundles validators, parsers, printers, metadata tools, fuzzing and mutation tools, debugging helpers, and component-model subcommands behind one `wasm-tools` binary.

### 项目历史

The public repository was created on May 19, 2020, after the Bytecode Alliance had formed around WebAssembly and WASI tooling. It gathered a family of Rust crates and CLI subcommands for operations that package authors, runtime developers, and standards implementers repeatedly need when inspecting or transforming Wasm artifacts.

The README describes the CLI as useful for debugging WebAssembly modules and components, with subcommands that also correspond to programmatic Rust crates such as `wasmparser`, `wat`, `wast`, `wasmprinter`, `wasm-smith`, `wasm-mutate`, `wasm-shrink`, `wit-component`, and `wasm-metadata`.

### 采用历史

wasm-tools grew in importance as WebAssembly moved beyond single core modules. The official component-model documentation describes components as an architecture for interoperable WebAssembly libraries, applications, and environments, and wasm-tools now includes component-focused commands for extracting WIT, embedding component type metadata, creating components, unbundling components, and converting WIT between text, JSON, and binary encodings.

The package is heavily used as infrastructure rather than as an end-user application. Its subcommands map to the daily chores of Wasm toolchain work: validate a module, round-trip text and binary formats, strip or inspect sections, demangle symbols, generate test cases, shrink reducer inputs, or examine component interfaces.

### 使用方式

Typical command-line usage is pipeline-friendly. The README shows examples such as parsing WAT to Wasm, printing Wasm back to text, validating modules, demangling and stripping custom sections, and using `wasm-tools component wit` or `wasm-tools component new` for component-model workflows.

The CLI conventions matter for package users: subcommands read from stdin when no file is given, write to stdout unless `--output` is supplied, can emit text format with `--wat` where applicable, and share standard help, verbosity, and color behavior. That makes it useful in scripts, CI, fuzzing harnesses, and reproducible packaging pipelines.

### 为什么软件包爱好者会关心

wasm-tools is the package-manager-friendly face of a large slice of the Rust WebAssembly infrastructure stack. Installing one binary gives maintainers access to tools that otherwise live as separate crates or test utilities, making it the Wasm equivalent of a Swiss-army debug and transform tool for modules and components.

### 时间线

- 2020-05-19: Public GitHub repository created.
- 2020s: Tool grows into a multi-crate CLI covering validation, parsing, printing, fuzzing, mutation, shrinking, metadata, and component-model tasks.
- 2026-06-12: GitHub releases show v1.252.0 as the latest release at research time.

### Related projects

- Related projects include Wasmtime, wasm-component-ld, wit-bindgen, cargo-component, the WebAssembly Component Model, and lower-level crates such as wasmparser, wat, wast, wasmprinter, wasm-smith, wasm-mutate, wasm-shrink, and wit-component.

### 来源

- <https://api.github.com/repos/bytecodealliance/wasm-tools>
- <https://bytecodealliance.org/projects>
- <https://component-model.bytecodealliance.org/>
- <https://docs.rs/wasm-tools/latest/wasm_tools/>
- <https://github.com/bytecodealliance/wasm-tools>


## 安全说明

没有找到 wasm-tools 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 其他软件包管理器记录

- Nix - wasm-tools: normalized package name match | nixpkgs package indexes: pkgs/by-name/wa/wasm-tools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - wasm-tools - 1.253.0-r0: normalized package name match | Alpine Linux edge package indexes: wasm-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CLI for low-level manipulation of WebAssembly modules | https://github.com/bytecodealliance/wasm-tools
- apk - wasm-tools-doc - 1.253.0-r0: normalized package name match | Alpine Linux edge package indexes: wasm-tools-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CLI for low-level manipulation of WebAssembly modules (documentation) | https://github.com/bytecodealliance/wasm-tools
- pacman - wasm-tools - 1.254.0-1: normalized package name match | Arch Linux sync databases: wasm-tools from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Low level tooling for WebAssembly in Rust | https://github.com/bytecodealliance/wasm-tools
- MacPorts - wasm-tools: normalized package name match | MacPorts ports tree: devel/wasm-tools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/wasm-tools.yml](https://github.com/mxcl/pkgdb/blob/main/combined/wasm-tools.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
