Ruskel
Ruskel is a tool for generating skeletonized outlines of Rust crates. It consists of two parts:
ruskel: A command-line interface for easy use.libruskel: A library that can be integrated into other Rust projects.
Both produce a single-page, syntactically valid Rust code representation of a crate, with all implementations omitted. This provides a clear overview of the crate's structure and public API.
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
Installation
CLI Tool
Install the Ruskel CLI tool using Cargo:
Library
To use libruskel in your Rust project, add it to your Cargo.toml:
[]
= "0.1.0"
Usage
CLI
Basic usage:
Where TARGET can be a directory, file path, or a module name. If omitted, it defaults to the current directory.
Options
--raw: Output raw JSON instead of rendered Rust code--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 more details, run:
Library
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.
Examples
Generate a skeleton for the current project:
Generate a skeleton for a specific crate from crates.io:
Output raw JSON data:
Include private items and auto-implemented traits:
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.