Files
docs-rust/ch14/ch14-05-extending-cargo.html
2026-06-22 21:27:36 +05:30

24 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Extending Cargo with Custom Commands</title>
</head>
<body>
<h2 id="extending-cargo-with-custom-commands"><a class="header" href="#extending-cargo-with-custom-commands">Extending Cargo with Custom Commands</a></h2>
<p>Cargo is designed so that you can extend it with new subcommands without having
to modify it. If a binary in your <code>$PATH</code> is named <code>cargo-something</code>, you can
run it as if it were a Cargo subcommand by running <code>cargo something</code>. Custom
commands like this are also listed when you run <code>cargo --list</code>. Being able to
use <code>cargo install</code> to install extensions and then run them just like the
built-in Cargo tools is a super-convenient benefit of Cargos design!</p>
<h2 id="summary"><a class="header" href="#summary">Summary</a></h2>
<p>Sharing code with Cargo and <a href="https://crates.io/">crates.io</a><!-- ignore --> is
part of what makes the Rust ecosystem useful for many different tasks. Rusts
standard library is small and stable, but crates are easy to share, use, and
improve on a timeline different from that of the language. Dont be shy about
sharing code thats useful to you on <a href="https://crates.io/">crates.io</a><!-- ignore
-->; its likely that it will be useful to someone else as well!</p>
</body>
</html>