Go to file
Robin Krahl 6dc75f0c5d
Add support for Rust 1.54.0, 1.55.0, 1.56.0
This patch adds tests for Rust 1.54.0, 1.55.0 and 1.56.0.  To make the
tests pass, we have to take care of some changes like more details
elements and changed heading levels.  To make it easier to generate the
tests for new Rust versions, we also add two bash scripts that take care
of that.
2021-10-26 23:29:54 +02:00
.builds Disable doc generation in CI 2021-06-19 14:00:42 +02:00
.reuse Refactor test suite to check multiple versions 2020-09-11 20:30:05 +02:00
LICENSES Initial project scaffolding 2020-07-19 14:10:54 +02:00
src Add support for Rust 1.54.0, 1.55.0, 1.56.0 2021-10-26 23:29:54 +02:00
tests Add support for Rust 1.54.0, 1.55.0, 1.56.0 2021-10-26 23:29:54 +02:00
.gitignore Initial project scaffolding 2020-07-19 14:10:54 +02:00
Cargo.lock Update dependencies 2021-06-19 13:37:39 +02:00
Cargo.toml Update dependencies 2021-06-19 13:37:39 +02:00
CHANGELOG.md Add support for Rust 1.54.0, 1.55.0, 1.56.0 2021-10-26 23:29:54 +02:00
CONTRIBUTING.md Refactor test suite to check multiple versions 2020-09-11 20:30:05 +02:00
INSTALL.md Release v0.4.3 2021-06-19 13:11:19 +02:00
README.md Bump MSRV to 1.45.0 2021-06-19 13:40:25 +02:00
rusty-man.jpg Add screenshot to readme 2020-10-09 12:15:33 +02:00
rusty-man.jpg.license Add screenshot to readme 2020-10-09 12:15:33 +02:00

rusty-man

$ rusty-man rusty-man | head -5
rusty-man                       Module rusty-man                       rusty-man

DESCRIPTION
      rusty-man is a command-line viewer for documentation generated by
      `rustdoc`.

A screenshot of rusty-man displaying the std::result documentation with the tui viewer

Example Usage

Before running rusty-man, make sure that you generated the documentation with cargo doc:

$ cd rusty-man && cargo doc

Then you can open the documentation for an item:

$ rusty-man kuchiki::NodeRef

You dont have to specificy the full item name:

$ rusty-man NodeRef

If the documentation is not placed in ./target/doc or the Rust installation directory, you have to manually set the source path using the -s/--source option:

$ rusty-man --source my/other/crate/target/doc io::Error

If there are multiple matches for the keyword, rusty-man will show you a list of all matching items:

$ rusty-man --source my/other/crate/target/doc u8
Found mulitple matches for u8  select one of:

[ 0 ] core::u8: The 8-bit unsigned integer type.
[ 1 ] std::u8: The 8-bit unsigned integer type.

> 1

For more usage information, run rusty-man --help.

Viewers

rusty-man has three viewers (select one with the --viewer option) that determine the output format:

  • plain prints the documentation to the standard output without formatting. This is the default for non-interactive use.
  • rich prints the documentation to the standard output with formatting and optional syntax highlighting. This is the default for interactive use.
  • tui is an interactive terminal interface. You can read the documentation and follow links.

Installation

To install rusty-man from source, clone this repository and use cargo to build the project, or use cargo install. See the INSTALL.md file for more information. rusty-man is also available as a package for these distributions:

  • Arch Linux: rusty-man in the Arch User Repository

rusty-man is developed for Unix-like systems. It should run on other platforms too, but with some limitations: The rich and tui viewers uses ANSI escape codes, which are not supported on older Windows versions. If you have trouble running rusty-man on your platform or if you want to help porting rusty-man to other platforms, please let me know.

Integrations

vim

You can set rusty-man as the keyword program with set keywordprg=rusty-man and then use K to open the documentation for the item under the cursor. If you want to apply this setting for all Rust files, add it to the ftplugin/rust.vim file in your vim runtime directory (e. g. ~/.vim).

Contributing

Contributions to this project are very welcome! You can contribute by writing code or documentation or by testing. See the CONTRIBUTING.md file for more information.

If you are looking for a good starting point, have a look at the issues with the label “good first issue” in rusty-mans issue tracker.

Minimum Supported Rust Version

This crate supports Rust 1.45.0 or later.

Contact

For bug reports, patches, feature requests or other messages, please send a mail to the mailing list ~ireas/rusty-man-dev@lists.sr.ht (public archive) or contact me directly. You can also use the rusty-man issue tracker for bug reports or features requests.

License

This project is licensed under the MIT License. For license information for the data used by the test suite, see the .reuse/dep5 file.

rusty-man complies with version 3.0 of the REUSE specification.