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

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
主站蜘蛛池模板: 壤塘县| 芒康县| 孙吴县| 依兰县| 中西区| 特克斯县| 浪卡子县| 揭东县| 伊金霍洛旗| 上杭县| 水城县| 准格尔旗| 阿勒泰市| 绥芬河市| 名山县| 和政县| 西城区| 北宁市| 汉川市| 乌苏市| 洪泽县| 炉霍县| 尼玛县| 炉霍县| 文山县| 彭州市| 蒙山县| 义马市| 集安市| 高密市| 嘉鱼县| 新巴尔虎右旗| 泉州市| 依兰县| 东城区| 米易县| 菏泽市| 新巴尔虎左旗| 广德县| 绥化市| 邮箱|