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 profile)自定义构建。
  • crates.io 上发布库。
  • 使用工作空间(workspace)组织大型项目。
  • crates.io 安装二进制文件。
  • 使用自定义命令(custom command)扩展 Cargo。

Cargo 能做的比我们在本章中介绍的功能还要多,因此要全面了解其所有功能,请参阅其文档