知识卡片
Cargo统一工程入口
创建项目后,源文件放入 src,包名、edition 和依赖放入 Cargo.toml。Cargo 读取清单组织编译并在约定目录产生结果。用同一入口操作单文件和多依赖项目,可让新成员沿用仓库的构建约定。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 入门 Hello, Cargo! · 查看原书依据
Cargo is Rust’s build system and package manager. Most Rustaceans use this tool to manage their Rust projects because Cargo handles a lot of tasks for you, such as building your code, downloading the libraries your code depends on, and building those libraries. (We call the libraries that your code needs dependencies.)
参考来源
- 位置:《The Rust Programming Language(第2版)》第01章 入门(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c01.xhtml`,块 0103)
- 结论依据:原文把依赖获取、依赖构建和本项目构建归入 Cargo 的职责。
- 原始内容:Cargo is Rust’s build system and package manager. Most Rustaceans use this tool to manage their Rust projects because Cargo handles a lot of tasks for you, such as building your code, downloading the libraries your code depends on, and building those libraries. (We call the libraries that your code needs dependencies.)