【问题标题】:How to find the git commit id of an included crate?如何找到包含的 crate 的 git commit id?
【发布时间】:2021-06-21 18:12:56
【问题描述】:

我在 Cargo.toml 中包含了一个 crate 作为依赖项:

bellman_ce = "=0.3.3"

我如何找到这个版本的包指向的提交 ID? 不幸的是,github repo 没有按版本号标记。

【问题讨论】:

  • 我可以查看 Cargo.toml 的历史记录,但不确定这是查找提交 ID 的正确方法。

标签: rust-cargo rust-crates


【解决方案1】:

你不能。 crates.io 上的 crates 不需要从 Git repo 构建,并且没有内置方法来确定 crate 是从哪个提交构建的。大多数 crates 在其历史记录中标记提交的版本来源,但在这种情况下,查看 Cargo.toml 的 Git 历史记录是您唯一的选择。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-25
    • 1970-01-01
    • 2011-01-08
    • 2017-03-19
    • 1970-01-01
    • 2018-04-26
    相关资源
    最近更新 更多