Installing the command-line executable
Assuming you have Rust/Cargo installed , run this command in a terminal:
cargo install ruloc
It will make the ruloc command available in your PATH if you've allowed the PATH to be modified when installing Rust . cargo uninstall ruloc uninstalls.
Back to the crate overview .
Readme
ruloc
A minimalist, AST-driven Rust lines of code counter with intelligent production/test separation.
ruloc provides precise source code metrics for Rust projects by leveraging AST-based parsing to accurately distinguish between production and test code. It counts blank lines, comments, rustdoc documentation, and executable code—all while maintaining a simple, single-file architecture that's easy to understand and extend.