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

  • Rust Quick Start Guide
  • Daniel Arbuckle
  • 182字
  • 2021-06-10 19:46:00

Project metadata

The Cargo.toml file is where metadata about the program is stored. That includes the program's name, version number, and authors, but importantly it also has a section for dependencies. Editing the content of the [dependencies] section is how we tell Rust that our code should be linked to external libraries when it is compiled, which libraries and versions to use, and where to find them. External libraries are collections of source code that were packaged up in order to make them easy to use as components of other programs. By finding and linking good libraries, we can save the time and effort of writing our whole program ourselves. Instead, we can write only the part that nobody else has already done.

By the way, .toml files are written in Tom's Obvious, Minimal Language ( TOML), a more well-defined and feature-complete version of the old .ini format that Microsoft popularized but never standardized. TOML is becoming quite popular, and is supported and used in a wide variety of languages and applications. You can find the language specification at https://github.com/toml-lang/toml.

主站蜘蛛池模板: 宁南县| 怀来县| 高淳县| 尼木县| 茂名市| 二连浩特市| 荥经县| 罗平县| 安宁市| 乃东县| 孝感市| 阿荣旗| 吉木萨尔县| 萨迦县| 临澧县| 泰兴市| 大竹县| 民乐县| 邵武市| 蚌埠市| 五常市| 清新县| 吴江市| 麦盖提县| 灯塔市| 福鼎市| 翁源县| 奉化市| 孝感市| 海丰县| 长宁县| 宝兴县| 比如县| 彭山县| 梁平县| 准格尔旗| 牡丹江市| 光泽县| 鄂托克旗| 河曲县| 赤城县|