I want to use an EDN parser but it is inside https://github.com/mozilla/mentat. https://github.com/mozilla/mentat/tree/master/edn has its own Cargo.toml.
I tried this:
[dependencies]
edn = { git = "https://github.com/mozilla/mentat/tree/master/edn" }
But it doesn't work.
Is it possible to add dependency to this crate inside the mentat repository?
git. Git uses this special subdirectory to store all the information about the project, including all files and sub-directories located within the project's directory. If we ever delete the . git subdirectory, we will lose the project's history. Next, we will change the default branch to be called main .
move everything from the subdirectory of the parent repo work tree to the child repo work tree. commit the child repo. replace the subdirectory in the parent repo with a submodule reference.
The [dependencies] section lets you add dependencies for your project. For example, suppose that we want our program to have a great CLI. You can find lots of great packages on crates.io (the official Rust package registry).
Cargo. toml and Cargo. lock are stored in the root of your project (package root). Source code goes in the src directory.
From the Cargo documentation:
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).
(emphasis mine)
This means that you can just say:
[dependencies]
edn = { git = "https://github.com/mozilla/mentat" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With