官术网_书友最值得收藏!

Cargo and Crates

Rust is a rather young language that has been designed from scratch to be a practical and useful tool for programmers. This is a great situation to be in: there are no legacy applications to care about, and many lessons learned from other languages have been incorporated in Rust—especially around tooling.

Integrating and managing third-party packages has been an issue in the past for a lot of languages, and there are a few different approaches out there:

  • NPM: The package manager for Node, which has been very popular with the JavaScript community
  • Maven: Enterprise-grade Java package management, based on the XML format
  • NuGet: .NET's package management
  • PyPI: The Python package index

Each of these has different styles of configuration, naming guidelines, publishing infrastructure, features, plugins, and so on. The Rust team learned from all of these approaches and built their own version: cargo. This chapter will be all about the power of cargo of how and where to integrate with the wealth of packages (called crates) out there. Whether you are working on your own small library or you are building a large enterprise-grade system, cargo will be a central piece of the project. By reading this chapter, you can look forward to the following:

  • Learning more about cargo, its configuration, and plugins
  • Knowing more about the different types of crates
  • Benchmarking and test integration done in cargo
主站蜘蛛池模板: 甘洛县| 邵武市| 南丹县| 乐清市| 广州市| 湟中县| 阜新| 屯昌县| 井冈山市| 长春市| 桐柏县| 临江市| 凤山市| 南充市| 孟津县| 巍山| 尤溪县| 巴里| 扎鲁特旗| 德保县| 凉城县| 仪陇县| 皮山县| 保德县| 依安县| 雷山县| 徐州市| 五家渠市| 石棉县| 昌宁县| 格尔木市| 马山县| 长乐市| 高平市| 政和县| 黎平县| 视频| 广平县| 诸暨市| 大埔区| 行唐县|