ruskel
Ruskel generates skeletonized outlines of Rust crates. It produces a single-page representation of a crate's public API with all implementation omitted, while still rendering syntactically correct Rust.
Ruskel has two main uses:
- To provide quick access to Rust documentation from the command line.
- To export the full public API of a crate as a single file to pass to LLMs and other tools.
Features
- Generate a skeletonized view of any Rust crate
- Support for local crates and remote crates from crates.io
- Syntax highlighting for terminal output
- Option to output raw JSON data for further processing
- Configurable to include private items and auto-implemented traits
- Support for custom feature flags
ruskel command line tool
ruskel is the command-line interface for easy use of the Ruskel functionality.
Because Ruskel uses nightly-only features on cargo doc, you need to have the
nightly toolchain installed.
Usage
Basic usage:
Where TARGET can be a directory, file path, or a module name. If omitted, it defaults to the current directory.
Sample Options
--no-page: Disable paging--auto-impls: Render auto-implemented traits--private: Render private items--no-default-features: Disable default features--all-features: Enable all features--features <FEATURES>: Specify features to enable (comma-separated)--highlight: Force enable syntax highlighting--no-highlight: Disable syntax highlighting
For full details, run:
Examples
Generate a skeleton for the current project:
Generate a skeleton for a specific crate, or a specific path within a crate from crates.io:
Generate a skeleton for at the given path:
Generate a skeleton for the module foo under the given path:
Include private items and auto-implemented traits:
libruskel library
libruskel is a library that can be integrated into other Rust projects to provide Ruskel functionality.
Usage
Here's a basic example of using libruskel in your Rust code:
use Ruskel;
Check the API documentation for more details on using the library.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.