← 返回刚才阅读的位置

知识卡片

操作参考卡 · 6075.c.1.o · 生成模型:未记录

安装 Cargo 工具二进制

理解等级:初级

用 cargo install 包名 安装有二进制目标的工具。它写到安装根的 bin,终端需要通过 PATH 找到该目录。包名和命令名可以不同,例如 ripgrep 对应 rg。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《The Rust Programming Language(第2版)》第14章 深入 Cargo 与 Crates.io(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c14.xhtml`,块 0185) - 结论依据:原文区分能安装运行的二进制目标和可供程序依赖的库目标。 - 原始内容:The cargo install command allows you to install and use binary crates locally. This isn’t intended to replace system packages; it’s meant to be a convenient way for Rust developers to install tools that others have shared on https://crates.io. Note that you can only install packages that have binary targets.