Rust 程序设计语言 简体中文版 1.85.0
生成项目的区别是 Cargo 将代码放在 src 目录,同时项目根目录包含一个 Cargo.toml 配置文件。 Cargo 期望源文件存放在 src 目录中。项目根目录只存放 README、license 信息、配置文件 和其他跟代码无关的文件。使用 Cargo 帮助你保持项目干净整洁。一切各得其所,井井有条。 如果没有使用 Cargo 开始项目,比如我们创建的 “Hello, world!” 一个警告接着是一个错误: $ cargo publish Updating crates.io index warning: manifest has no description, license, license-file, documentation, 308/562Rust 程序设计语言 简体中文版 homepage or repository. See https://doc.rust-lang description, license. Please see https://doc.rust-lang.org/ cargo/reference/manifest.html for more information on configuring these fields 这个错误是因为我们缺少一些关键信息:关于该 crate 用途的描述和用户可能在何种条款下使 用该 crate 的 license。在 Cargo0 码力 | 562 页 | 3.23 MB | 9 天前3
共 1 条
- 1