我可以添加一个作为git存储库子目录的依赖包吗?
问题描述:
我想使用EDN解析器,但它在https://github.com/mozilla/mentat之内。 https://github.com/mozilla/mentat/tree/master/edn有它自己的Cargo.toml。我可以添加一个作为git存储库子目录的依赖包吗?
我尝试这样做:
[dependencies]
edn = { git = "https://github.com/mozilla/mentat/tree/master/edn" }
但它不工作。
是否有可能在mentat存储库中为此包添加依赖项?
答
货物将获取在这个位置Git仓库,然后寻找一个
Cargo.toml
为请求的箱子(在根不一定)git仓库内的任何地方。
(重点煤矿)
这意味着,你可以说:
[dependencies]
edn = { git = "https://github.com/mozilla/mentat" }