ruskel
Ruskel produces a syntactically correct, single-page skeleton of a crate's public API. If the crate is not found in the local workspace, it is fetched from crates.io.
Ruskel is great for:
- Quick access to Rust documentation from the command line.
- Exporting the full public API of a crate as a single file to pass to LLMs and other tools.
For example, here is the skeleton of the very tiny termsize crate. Note that
the entire public API is included, but all implementation is omitted.
Features
- Generate a skeletonized view of any Rust crate
- Support for both local crates and remote crates from crates.io
- Syntax highlighting for terminal output
- Optionally include private items and auto-implemented traits
- Support for custom feature flags and version specification
Installation
To install Ruskel, run:
Usage
Ruskel uses nightly-only features on cargo doc for document generation, so you
need to have the nightly toolchain installed to run it, but not to install it.
Basic usage:
See the help output for all options:
Ruskel has a flexible target specification that tries to do the right thing in a wide set of circumstances.
# Current project
# If we're in a workspace and we have a crate mypacakage
# A dependency of the current project, else we fetch from crates.io
# A sub-path within a crate
# Path to a crate
# A module within that crate
# A crate from crates.io with a specific version
libruskel library
libruskel is a library that can be integrated into other Rust projects to
provide Ruskel functionality.
Here's a basic example of using libruskel in your Rust code:
use Ruskel;