MCPcopy Index your code
hub / github.com/deadlinks/cargo-deadlinks

github.com/deadlinks/cargo-deadlinks @0.8.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.8.1 ↗ · + Follow
96 symbols 193 edges 18 files 21 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cargo-deadlinks • Crates.io License

Check your cargo doc documentation for broken links!

Useful if you just refactored the structure of your crate or want to ensure that your documentation is readable offline.

This crate pairs well with intra-doc links and [cargo-intraconv], which make it easier to write links without having to know the exact HTML page rustdoc will generate.

deadlinks can also be used on projects that aren't Rust crates.

Installation

Install cargo-deadlinks via:

cargo install cargo-deadlinks

Alternatively, install pre-built binaries from the releases page.

Usage

From your packages directory run:

# this will automatically run `cargo doc` for you
# any broken links will show up in the output
cargo deadlinks
# if you also want to check http and https links
cargo deadlinks --check-http

By default cargo deadlinks will check only the offline (file://) links of your package.

If you want to check the documentation in another directory e.g. to check all your dependencies, you can provide the --dir argument:

cargo deadlinks --dir target/doc

To check a project that isn't a crate, use deadlinks instead:

# this requires that you already have a static site in build/html
deadlinks build/html

For information about other arguments run cargo deadlinks --help.

Minimum Supported Rust Version (MSRV)

The current MSRV is 1.45.0. This may be increased in minor versions, but will never increase in a patch version.

Contributing

We are happy about any contributions!

To get started you can take a look at our Github issues.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Core symbols most depended-on inside this repo

is_available
called by 8
src/check.rs
remove_all
called by 7
tests/simple_project.rs
deadlinks
called by 7
tests/simple_project.rs
assert_doc
called by 6
tests/simple_project.rs
url_for
called by 5
src/check.rs
get_html
called by 4
src/check.rs
parse_a_hrefs
called by 3
src/parse.rs
check_file_url
called by 3
src/check.rs

Shape

Function 73
Method 11
Class 8
Enum 4

Languages

Rust100%

Modules by API surface

src/check.rs30 symbols
tests/simple_project.rs13 symbols
src/lib.rs9 symbols
src/bin/cargo-deadlinks.rs8 symbols
src/parse.rs7 symbols
tests/simple_project/src/lib.rs5 symbols
src/bin/shared.rs4 symbols
src/bin/deadlinks.rs4 symbols
tests/working_http_check/src/lib.rs3 symbols
tests/working_http_check.rs3 symbols
tests/non_existent_http_link/src/lib.rs3 symbols
tests/broken_links.rs2 symbols

For agents

$ claude mcp add cargo-deadlinks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact