Rust 程序设计语言 简体中文版 1.85.027/562Rust 程序设计语言 简体中文版 现在我们有了一个外部依赖,Cargo 从 registry 上获取所有包的最新版本信息,这是一份来自 Crates.io 的数据副本。Crates.io 是 Rust 生态系统中,人们发布其开源 Rust 项目的平台,供 他人使用。 在更新完 registry 后,Cargo 检查 [dependencies] section 并下载列表中包含但还未下载的 系列的版本, 必须像这样更新 Cargo.toml 文件: [dependencies] rand = "0.9.0" 下一次运行 cargo build 时,Cargo 会更新可用 crate 的 registry,并根据你指定的新版本重 新评估 rand 的要求。 第十四章会讲到 Cargo 及其生态系统 的更多内容,不过目前你只需要了解这么多。通过 Cargo 复用库文件非常容易,因此 Rustacean org/cargo/reference/manifest.html#package-metadata for more info. --snip-- error: failed to publish to registry at https://crates.io Caused by: the remote server responded with an error (status 400 Bad Request):0 码力 | 562 页 | 3.23 MB | 29 天前3
共 1 条
- 1













