2 releases
Uses old Rust 2015
0.1.1 | Apr 9, 2017 |
---|---|
0.1.0 | Apr 9, 2017 |
#623 in Cargo plugins
13KB
252 lines
cargo navigate
This is the repository for the tools cargo-navigate
, cargo-repo
and cargo-home
,
which will open your default Internet browser on a crate's URL.
The main tool allows you to navigate to:
- repo: the crate's repository;
- docs: the crate's documentation;
- home: the crate's homepage;
- crates: the crate's page on crates.io.
Installing
cargo install cargo-navigate
Using
cargo navigate <where> [crate]
cargo repo [crate]
cargo home [crate]
The argument where can be one of "repo", "home", "crates", "docs", along with some other similar aliases.
When crate is omitted, the crate in the working directory is assumed. Otherwise, the crate is assumed to be registered in crates.io. If the "documentation" metadata is not present when attempting to open the documentation, the browser will navigate to the crate's docs.rs page.
Binary aliases are available for accessing the repository and homepage: cargo repo
and cargo home
.
Thus, cargo repo
would be the Rust equivalent of npm repo
in the JavaScript development environment.
Examples:
cargo navigate docs rayon # navigate to rayon's documentation
cargo repo # navigate to this crate's repository
cargo home rocket-rs # navigate to Rocket's homepage
Building and Installing from source
cargo build --release
cargo install
This project is in an alpha stage, so bugs and other issues might occur. Nevertheless, your contributions are welcome!
Dependencies
~6–15MB
~198K SLoC