# Install cargo-llvm-lines with Homebrew, Nix

Count lines of LLVM IR per generic function. Version 0.4.46 via Homebrew; verified 2026-05-29.

## Install

```sh
sudo av install brew:cargo-llvm-lines
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cargo-llvm-lines
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-llvm-lines
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ca/cargo-llvm-lines/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:cargo-llvm-lines
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cargo-llvm-lines>
- **Version:** 0.4.46
- **Source summary:** Count lines of LLVM IR per generic function
- **Homepage:** <https://github.com/dtolnay/cargo-llvm-lines>
- **Repository:** <https://github.com/dtolnay/cargo-llvm-lines>
- **Upstream docs:** <https://github.com/dtolnay/cargo-llvm-lines#readme>
- **License:** Apache-2.0 OR MIT
- **Source archive:** <https://github.com/dtolnay/cargo-llvm-lines/archive/refs/tags/0.4.46.tar.gz>
- **Last updated:** 2026-05-29T17:20:08+02:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cargo-llvm-lines (cli)
- cargo-llvm-lines (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.4.46
- Package-manager updated: 2026-05-29
- Local data: ok
- Upstream repository: https://github.com/dtolnay/cargo-llvm-lines
- Upstream latest detected: 0.4.46 (current)
## Project history and usage

cargo-llvm-lines measures the number and size of LLVM IR instantiations for generic functions in a Rust program. Its README frames the output as a way to find code with the highest leverage for improving compilation metrics.

### Project history

The crate first appeared on crates.io in November 2017 as version 0.1.0. The README credits the idea to eddyb's suggestion for counting monomorphized functions while debugging compiler memory use, executable size, and compile time.

### Adoption history

The package is available through Homebrew and Nix according to the input facts, and crates.io reported 134,082 downloads when checked on 2026-06-30. Its audience is narrower than test runners or build tools, but it is well known among Rust developers investigating monomorphization bloat.

### How it is used

Users run cargo llvm-lines to see total LLVM IR lines, number of copies, and function names, optionally using -p to inspect a package in a multi-crate project or release/LTO settings for a broader view.

### Why package nerds care

It is a package-nerd tool because it exposes otherwise hidden codegen costs in dependency and generic-heavy Rust crates, helping maintainers decide where small API or generic changes can reduce compile time and binary size.

### Timeline

- 2017: First crates.io release 0.1.0.
- 2026: Crates.io latest version 0.4.46 and Homebrew stable version 0.4.46.

### Related projects

- Related tooling includes Cargo, rustc/LLVM IR output, and compiler performance analysis workflows.

### Sources

- <https://api.github.com/repos/dtolnay/cargo-llvm-lines>
- <https://github.com/dtolnay/cargo-llvm-lines>
- <https://github.com/dtolnay/cargo-llvm-lines#readme>
- <https://crates.io/api/v1/crates/cargo-llvm-lines>
- <https://formulae.brew.sh/api/formula/cargo-llvm-lines.json>


## Security Notes

No matching local secret-handling manifest was found for cargo-llvm-lines. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cargo-llvm-lines
- **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 - cargo-llvm-lines: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-llvm-lines/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-binutils](https://www.automicvault.com/pkg/brew/cargo-binutils/) - Shares av.db curated category or tags: cargo, cli, developer-tools, llvm, rust.
- [cargo-llvm-cov](https://www.automicvault.com/pkg/brew/cargo-llvm-cov/) - Shares av.db curated category or tags: cargo, cli, developer-tools, llvm, rust.
- [cargo-public-api](https://www.automicvault.com/pkg/brew/cargo-public-api/) - Shares av.db curated category or tags: cargo, cli, code-analysis, developer-tools, rust.
- [cargo-auditable](https://www.automicvault.com/pkg/brew/cargo-auditable/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-binstall](https://www.automicvault.com/pkg/brew/cargo-binstall/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-bloat](https://www.automicvault.com/pkg/brew/cargo-bloat/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-bundle](https://www.automicvault.com/pkg/brew/cargo-bundle/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-c](https://www.automicvault.com/pkg/brew/cargo-c/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.

## Combined YAML source

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


## Sources

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