Automic VaultAutomic Vault

brew

Install cargo-component with Homebrew, Nix

Create WebAssembly components based on the component model proposal. Version 0.21.1 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install cargo-component

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#cargo-component

nixpkgs package indexes · pkgs/by-name/ca/cargo-component/package.nix · source: api.github.com

overview

Package summary

Create WebAssembly components based on the component model proposal

Commands and aliases

  • cargo-component

history

Project history and usage

cargo-component is a Bytecode Alliance Cargo subcommand for creating WebAssembly components from Rust projects. It exists to bridge Cargo workflows with the WebAssembly component model, WIT interfaces, generated bindings, and component dependencies.

Project history

The repository was created in 2022 under the Bytecode Alliance. Its README describes cargo-component as an experimental attempt to imagine what first-class Rust support for WebAssembly components might look like before Cargo itself has native component-model support.

The project grew alongside Bytecode Alliance work on the WebAssembly component model, wit-bindgen, Wasmtime, and WASI Preview 2. It uses Cargo.toml metadata and generates Rust bindings so component interfaces can be used in a Cargo-like development loop.

Adoption history

Adoption has followed the WebAssembly component-model community rather than general Rust CLI usage. crates.io metadata shows hundreds of thousands of downloads by June 2026, and Homebrew and Nix packaging make it easier to install for component-model experiments and CI builds.

The README notes that Rust's upstream wasm32-wasip2 target now produces components for some WASI use cases, leaving cargo-component most relevant where projects need non-WASI WIT interfaces, component dependencies, or features not yet covered by plain Cargo.

How it is used

The documented flow starts with `cargo component new --lib <name>` or a command component, creates a `wit/world.wit` interface, implements generated bindings in Rust, and builds with `cargo component build`.

The tool can also add and update component interface dependencies through Cargo.toml, and it supports adapter configuration in `[package.metadata.component]` for WASI Preview 1 to Preview 2 adaptation.

Why package nerds care

cargo-component is significant because it treats WebAssembly components as packageable dependencies inside Cargo projects. For package ecosystem watchers, it is a live example of how Rust's package manager might evolve when language packages and portable component interfaces meet.

It also marks a transitional period: component-model tooling is moving quickly, and the README explicitly frames cargo-component as useful until more support lands in the Rust compiler and Cargo.

Timeline

  • 2021: crates.io records an initial cargo-component publication.
  • 2022: GitHub repository created under bytecodealliance/cargo-component.
  • 2024: README references Rust 1.82 adding the upstream wasm32-wasip2 target.
  • 2025: GitHub releases show the 0.21.x series.

Related projects

  • The WebAssembly component model defines the component format cargo-component targets.
  • wit-bindgen generates bindings for WIT interfaces and is closely related to cargo-component's generated Rust bindings.
  • Wasmtime supplies WASI adapter work referenced by the README.
  • Rust's wasm32-wasip2 target is an upstream alternative for some WASI-only component builds.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 8 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
Cargo.toml.vscode/settings.json

executables

Installed executables

CommandKindExposureNote
cargo-componentcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version0.21.1
manager updated
local dataok
upstreamcurrent
latest detectedv0.21.1

https://github.com/bytecodealliance/cargo-component

  • infoNo package-manager update timestamp was available.low confidence

install metadata

Package metadata

Package keybrew:cargo-component
Version0.21.1
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/cargo-component
Homepagehttps://github.com/bytecodealliance/cargo-component
Repositoryhttps://github.com/bytecodealliance/cargo-component
Upstream docshttps://github.com/bytecodealliance/cargo-component#readme
LicenseApache-2.0
Source archivehttps://github.com/bytecodealliance/cargo-component/archive/refs/tags/v0.21.1.tar.gz
Build dependenciesrust
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namecargo-component
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

cargo-component

nix profile install nixpkgs#cargo-component
  • normalized package name match
  • Matched by: Cargo Component
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ca/cargo-component/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment