← 返回刚才阅读的位置

知识卡片

操作参考卡 · 6075.c.1.h · 生成模型:未记录

发布凭据和包元数据

理解等级:中级

发布前检查包名是否可用,在 [package] 填写版本、描述和许可。许可通常使用 SPDX 标识,可用 OR 指定备选许可,或通过 license-file 引用随包发布的自定义许可文本。注册表令牌通过 Cargo 登录流程配置,泄露应撤销并重发。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 深入 Cargo 与 Crates.io Setting Up a Crates.io Account · 查看原书依据

      This results in an error because you’re missing some crucial information: a description and license are required so people will know what your crate does and under what terms they can use it. In Cargo.toml, add a description that’s just a sentence or two, because it will appear with your crate in search results. For the license field, you need to give a license identifier value.

    参考来源

    - 位置:《The Rust Programming Language(第2版)》第14章 深入 Cargo 与 Crates.io(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c14.xhtml`,块 0100) - 结论依据:原文用拒绝缺少简介及许可的发布解释元数据用途。 - 原始内容:This results in an error because you’re missing some crucial information: a description and license are required so people will know what your crate does and under what terms they can use it. In Cargo.toml, add a description that’s just a sentence or two, because it will appear with your crate in search results. For the license field, you need to give a license identifier value.