crawk
Dependency crawler for Rust. It crawls so you don't have to untangle
Features
- Module listing: See which modules are defined in a crate.
- Module usage: See which modules are used by a given module in a crate.
Installation
CLI
Quick Start
CLI
Module listing - list subcommand
# List all modules in the current crate:
# List only a module subtree (root included):
# Show only modules up to a given nesting depth:
# Filter listed modules and render them as a table:
# Analyze a crate located at a custom path and show source files:
Module usage - use subcommand
# Analyze which internal modules a given module depends on
# Recursively analyze all submodules of a module:
# Expand grouped imports (`a::{x, y}` → `a::x`, `a::y`) and resolve glob imports:
# Limit dependency path depth and group output by source module:
# Analyze a crate located at a custom path, including test modules:
CLI Options
Please refer to crawk command CLI help for a comprehensive list of options:
# General help for crawk (including global options and subcommands)
# Help for the 'list' subcommand (including options specific to listing modules)
# Help for the 'use' subcommand (including options specific to module usage analysis)
Note: option -h gives short help, while --help provides detailed information about available options and their usage.
License
This project is licensed under the Apache License. See the LICENSE file for details.
Why "crawk"?
The name crawk playfully blends crawl and awk, capturing the tool's mission to crawl Rust code for module dependency analysis.
It sounds action-oriented, evoking exploration of crate structures. It sounds action-oriented, evoking exploration of crate structures.
It was created to help me understand and manage the often complex web of module dependencies in my projects.