Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

更多关于 Cargo 和 Crates.io 的内容

到目前为止,我们只使用了 Cargo 最基本的功能来构建、运行和测试代码,但它能做的远不止这些。在本章中,我们将讨论它的一些更高级的功能,向你展示如何完成以下操作:

  • 通过发布配置(release profiles)自定义构建。
  • crates.io 上发布库。
  • 使用工作空间(workspaces)组织大型项目。
  • crates.io 安装二进制文件。
  • 使用自定义命令扩展 Cargo。

Cargo 的功能远不止本章所涵盖的内容,要了解其所有功能的完整说明,请参阅 Cargo 文档