我想使用 EDN 解析器,但它在 https://github.com/mozilla/mentat 中. https://github.com/mozilla/mentat/tree/master/edn有自己的 Cargo.toml。
我试过这个:
[dependencies]
edn = { git = "https://github.com/mozilla/mentat/tree/master/edn" }
但它不起作用。
是否可以在 mentat 存储库中添加对这个 crate 的依赖?
最佳答案
Cargo will fetch the git repository at this location then look for a
Cargo.toml
for the requested crate anywhere inside the git repository (not necessarily at the root).
(强调我的)
这意味着你可以说:
[dependencies]
edn = { git = "https://github.com/mozilla/mentat" }
关于git - 我可以在 git 存储库中添加一个作为子目录的依赖包吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50351721/