cargo-census

Crates.iocargo-census
lib.rscargo-census
version0.1.0
created_at2026-01-16 15:07:57.154521+00
updated_at2026-01-16 15:07:57.154521+00
descriptionAnalyze Rust crate module structure and item counts
homepagehttps://github.com/tilacog/cargo-census
repositoryhttps://github.com/tilacog/cargo-census
max_upload_size
id2048751
size43,620
(tilacog)

documentation

README

cargo-census

Analyze Rust crate module structure and item counts.

Counts functions, structs, enums, consts, statics, types, traits, impls, macros, and mods per module.

Install

cargo install --path .

Usage

cargo census                    # analyze current directory
cargo census /path/to/crate     # analyze specific path
cargo census -f table           # table format
cargo census -f json            # JSON output
cargo census --workspace        # all workspace members
cargo census -p some-crate      # specific package

Example

$ cargo census
cargo-census (45 items)
    ├── fn: 3, struct: 2, enum: 1, mod: 3
    ├── parser (src/parser.rs) [6 items]
    │   └── fn: 6
    ├── stats (src/stats.rs) [22 items]
    │   ├── fn: 7, struct: 4, enum: 1
    │   └── impl: 4, methods: 6
    └── workspace (src/workspace.rs) [8 items]
        ├── fn: 5, struct: 1
        └── impl: 1, methods: 1
Commit count: 4

cargo fmt