What problem does it solve?
Clones Rust crate repositories from crates.io to explore their source code. It fetches the repository URL from the crates.io API, clones to /tmp/rust-crates/, and checks out the appropriate version tag.
Core Features & Use Cases
- Fetch crate info: query crates.io to retrieve the repository URL and latest version.
- Clone and prepare: clone the repository to /tmp/rust-crates if not cached, then prepare for exploration.
- Checkout versions: attempt to checkout the correct version tag using common naming patterns, with a fallback to HEAD when no tag matches.
- Explore source: use Read, Glob, and Grep tools to inspect the crate's source code, typically under src/.
- Use Case: when you want to understand how a crate is implemented or verify internals, including monorepos with multiple crates.
Quick Start
Fetch the crate info from crates.io, clone the repository to /tmp/rust-crates, and check out the latest version tag to start exploring its source.