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

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
主站蜘蛛池模板: 兴山县| 忻城县| 武乡县| 钟祥市| 阳江市| 应城市| 邮箱| 阳春市| 磐石市| 南开区| 略阳县| 濮阳市| 孙吴县| 镇宁| 广南县| 邵武市| 陕西省| 襄樊市| 定日县| 万安县| 澳门| 乌拉特前旗| 大埔县| 望江县| 陇西县| 阜阳市| 横山县| 枣强县| 容城县| 济源市| 伊吾县| 上林县| 班戈县| 灵石县| 灵丘县| 林口县| 舒兰市| 济南市| 监利县| 唐河县| 朝阳市|