# Install rust with Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, scoop, zypper, apt

Safe, concurrent, practical language. Version 1.96.1 via Homebrew; verified 2026-07-04.

## Install

```sh
sudo av install brew:rust
```

## Agent safety answer

rust tooling builds binaries and can publish crates through Cargo workflows.

- **Credential access:** Reads Cargo credentials, Git credentials, environment variables, and project config.
- **Remote mutation:** Can run build scripts and toolchain commands that call external systems.
- **Publish/artifact risk:** Can publish crates and release binaries.
- **Recommended control:** Gate cargo publish, install scripts, and credentialed registry access.
- **Agent-use guidance:** Allow build/test/doc commands; require approval for publish and release automation.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install rust
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install rust
```

  Evidence: MacPorts ports tree: lang/rust/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add cargo
```

  Evidence: Alpine Linux edge package indexes: cargo from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install cargo
```

  Evidence: Fedora Rawhide package metadata: cargo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#rust
```

  Evidence: nixpkgs package indexes: rust from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S rust
```

  Evidence: Arch Linux sync databases: rust from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install cargo
```

  Evidence: openSUSE Tumbleweed package metadata: cargo from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

- Debian apt (92%):

```sh
sudo apt install cargo
```

  Evidence: Debian stable package indexes: cargo from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

### Windows

- Chocolatey (92%):

```sh
choco install rust
```

  Evidence: Chocolatey community package catalog: rust from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','rubymine'

- Scoop (92%):

```sh
scoop install main/rust
```

  Evidence: Scoop official bucket manifest trees: bucket/rust.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:rust
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/rust>
- **Version:** 1.96.1
- **Source summary:** Safe, concurrent, practical language
- **Homepage:** <https://www.rust-lang.org/>
- **Repository:** <https://github.com/rust-lang/rust>
- **Upstream docs:** <https://doc.rust-lang.org/>
- **License:** Apache-2.0 OR MIT
- **Source archive:** <https://static.rust-lang.org/dist/rustc-1.96.1-src.tar.gz>
- **Last updated:** 2026-07-04T18:42:50Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cargo (cli)
- cargo-clippy (cli)
- cargo-fmt (cli)
- clippy-driver (cli)
- rust-gdb (cli)
- rust-gdbgui (cli)
- rust-lldb (cli)
- rustc (cli)
- rustdoc (cli)
- rustfmt (cli)
- cargo (alias)
- cargo-clippy (alias)
- cargo-fmt (alias)
- clippy-driver (alias)
- rust-gdb (alias)
- rust-gdbgui (alias)
- rust-lldb (alias)
- rustc (alias)
- rustdoc (alias)
- rustfmt (alias)

## Dependencies

- libgit2
- libssh2
- llvm
- openssl@3
- pkgconf
- sqlite

## Uses from macOS

- curl

## Install behavior

- Post-install hook: not defined
- Caveats: Link this toolchain with `rustup` under the name `system` with: rustup toolchain link system "$(brew --prefix rust)" If you use rustup, avoid PATH conflicts by following instructions in: brew info rustup
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.96.1
- Package-manager updated: 2026-07-04
- Local data: ok
- Upstream repository: https://www.rust-lang.org/
- info: Release/tag comparison is only available for GitHub repositories.

## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## 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.


## Credential files

- Unix: ~/.cargo/credentials.toml, ~/.cargo/credentials
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** rust
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - rust: normalized package name match | nixpkgs package indexes: rust from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- apk - cargo - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: cargo from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The Rust package manager | https://doc.rust-lang.org/cargo/
- apk - cargo-bash-completions - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: cargo-bash-completions from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash completions for cargo | https://doc.rust-lang.org/cargo/
- apk - cargo-doc - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: cargo-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The Rust package manager (documentation) | https://doc.rust-lang.org/cargo/
- apk - cargo-zsh-completion - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: cargo-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | ZSH completions for cargo | https://doc.rust-lang.org/cargo/
- apk - rust - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Rust Programming Language toolchain | https://www.rust-lang.org/
- apk - rust-clippy - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-clippy from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Lints to catch common mistakes and improve your Rust code | https://doc.rust-lang.org/clippy/
- apk - rust-clippy-doc - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-clippy-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Rust Code Linter (documentation) | https://www.rust-lang.org/
- apk - rust-dbg - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Rust Programming Language toolchain (debug symbols) | https://www.rust-lang.org/
- apk - rust-doc - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Rust Programming Language toolchain (documentation) | https://www.rust-lang.org/
- apk - rust-gdb - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-gdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | GDB pretty printers for Rust | https://rustc-dev-guide.rust-lang.org/debugging-support-in-rustc.html
- apk - rust-lldb - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-lldb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLDB pretty printers for Rust | https://rustc-dev-guide.rust-lang.org/debugging-support-in-rustc.html
- apk - rust-src - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-src from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Rust Programming Language toolchain (source code) | https://github.com/rust-lang/rust/tree/1.96.0
- apk - rust-uefi - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-uefi from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | UEFI targets for rust | https://rust-osdev.com/uefi-book
- apk - rust-wasm - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rust-wasm from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | WebAssembly targets for rust | https://rust-lang.org/what/wasm/
- apk - rustc-dev - 1.96.0-r0: normalized package name match | Alpine Linux edge package indexes: rustc-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Rust Programming Language toolchain (compiler libraries) | https://www.rust-lang.org/


## Related links

- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [libgit2](https://www.automicvault.com/pkg/brew/libgit2/) - Runtime dependency declared by Homebrew.
- [llvm](https://www.automicvault.com/pkg/brew/llvm/) - Runtime dependency declared by Homebrew.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Runtime dependency declared by Homebrew.
- [sqlite](https://www.automicvault.com/pkg/brew/sqlite/) - Runtime dependency declared by Homebrew.
- [anchor](https://www.automicvault.com/pkg/brew/anchor/) - Popular package that depends on this formula.
- [helix-db](https://www.automicvault.com/pkg/brew/helix-db/) - Popular package that depends on this formula.
- [pake](https://www.automicvault.com/pkg/brew/pake/) - Popular package that depends on this formula.
- [rust-script](https://www.automicvault.com/pkg/brew/rust-script/) - Popular package that depends on this formula.
- [nim](https://www.automicvault.com/pkg/brew/nim/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language, systems-programming.
- [swift](https://www.automicvault.com/pkg/brew/swift/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language, systems-programming.
- [three-body](https://www.automicvault.com/pkg/brew/three-body/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language, rust.
- [algol68g](https://www.automicvault.com/pkg/brew/algol68g/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [ats2-postiats](https://www.automicvault.com/pkg/brew/ats2-postiats/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [ballerina](https://www.automicvault.com/pkg/brew/ballerina/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [chapel](https://www.automicvault.com/pkg/brew/chapel/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [coconut](https://www.automicvault.com/pkg/brew/coconut/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.
- [crystal](https://www.automicvault.com/pkg/brew/crystal/) - Local package facts share a topical domain. Shared terms: cli, compiler, language, language-runtime, llvm.
- [julia](https://www.automicvault.com/pkg/brew/julia/) - Local package facts share a topical domain. Shared terms: cli, compiler, language, language-runtime, libgit2.
- [inko](https://www.automicvault.com/pkg/brew/inko/) - Local package facts share a topical domain. Shared terms: cli, compiler, concurrent, language, language-runtime.

## Combined YAML source

View the package source record on GitHub. [combined/rust.yml](https://github.com/automic-vault/db/blob/main/combined/rust.yml)


## Sources

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