Code Monkey home page Code Monkey logo

cargo-docset's Introduction

cargo-docset - Generate a Zeal/Dash docset for your Rust crate or workspace

Build Status Crate

cargo-docset is a tool allowing you to generate a Dash/Zeal compatible docset for your Rust packages and their dependencies.

Installation

cargo-docset depends on the SQLite3 library. You can either install the SQLite3 library on your system (see rusqlite's documentation for help), or build the version that is bundled in the libsqlite3-sys crate by turning on the bundled-sqlite feature flag when building cargo-docset.

You can install cargo docset with the usual cargo command: cargo install cargo-docset.

How to use

Just run cargo docset in your crate's directory to generate the docset. It will be placed in the target/docset directory. cargo-docset generally supports the same options as cargo doc, with a few additional ones. Run cargo docset --help for more information.

To install your shiny new docset, copy it to your Zeal/Dash docset directory (available in the preferences, on Zeal at least) and restart Zeal/Dash.

How it works

Currently, cargo docset runs cargo to generate the documentation, and then recursively walks the generated directory. The contents of every file is inferred from the file path, and cargo-docset then fills a SQLite database with the gathered information. The details of docset generation are available here.

cargo-docset does not (yet, at least) try to parse the generated documentation in any way, and therefore is limited in the granularity of the index it can provide. In particular, the generated docset does not make use of the table of contents feature.

Also, because cargo-docset walks through the whole doc directory, it must clear it before attempting to generate the docset, in case there is some previously generated documentation that we don't want to pickup in the docset there. You should probably not be storing anything of value in that directory anyway, but keep it in mind.

Contributions

See here.

cargo-docset's People

Contributors

robzz avatar zgotsch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.