Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Ruskel generates skeletonized outlines of Rust crates.

License

NotificationsYou must be signed in to change notification settings

cortesi/ruskel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crates.ioDocumentationLicense: MIT

Ruskel produces a syntactically correct, single-page skeleton of a crate'spublic API. If the crate is not found in the local workspace, it is fetchedfromcrates.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 andother tools.

For example, here is the skeleton of the very tinytermsize crate. Note thatthe entire public API is included, but all implementation is omitted.

pubmod termsize{//! Termsize is a tiny crate that provides a simple//! interface for retrieving the current//! [terminal interface](http://www.manpagez.com/man/4/tty/) size//!//! ```rust//! extern crate termsize;//!//! termsize::get().map(|size| println!("rows {} cols {}", size.rows, size.cols));//! ```/// Container for number of rows and columns#[derive(Debug)]pubstructSize{pubrows:u16,pubcols:u16,}/// Gets the current terminal sizepubfnget() ->Option<self::super::Size>{}}

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:

cargo install ruskel

Usage

Ruskel uses nightly-only features oncargo doc for document generation, so youneed to have the nightly toolchain installed to run it, but not to install it.

Basic usage:

ruskel [TARGET]

See the help output for all options:

ruskel --help

Ruskel has a flexible target specification that tries to do the right thing ina wide set of circumstances.

# Current projectruskel# If we're in a workspace and we have a crate mypacakageruskel mypackage# A dependency of the current project, else we fetch from crates.ioruskel serde# A sub-path within a crateruskel serde::de::Deserialize# Path to a crateruskel /my/path# A module within that crateruskel /my/path::foo# A crate from crates.io with a specific versionruskel serde@1.0.0

libruskel library

libruskel is a library that can be integrated into other Rust projects toprovide Ruskel functionality.

Here's a basic example of usinglibruskel in your Rust code:

use libruskel::Ruskel;fnmain() ->Result<(),Box<dyn std::error::Error>>{let rs =Ruskel::new("/path/to/target")?;let rendered = rs.render(false,false)?;println!("{}", rendered);Ok(())}

About

Ruskel generates skeletonized outlines of Rust crates.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp