How can the master branch of an individual crate be used in the Cargo.toml of a personal project? Cargo.toml requires a link to a git repository per crate. But GitHub provides only a link to the root of the repo.
How would the Cargo syntax look? I'd like something like this:
[package]
...
[dependencies]
rocket = { git = /* URL to rocket crate here */ }
rocket_codegen = { git = /* URL to rocket_codegen crate here */ }
...
[dependencies.rocket_contrib]
git = /* URL to rocket_contrib crate here */
...
I tried using the URL of the dir directly, but that resulted in a 404 (since it's not a direct link to a git repo).
Simply link to the main repo, it's my understanding that cargo parse's the Cargo.toml at the url pointed to by 'git' parameter to look for repository names
[package]
...
[dependencies]
rocket = { git ="https://github.com/SergioBenitez/Rocket" }
rocket_codegen = { git = "https://github.com/SergioBenitez/Rocket"}
...
[dependencies.rocket_contrib]
git = "https://github.com/SergioBenitez/Rocket"
...
@bytebuddha's response is exactly right! Thanks, @bytebuddha.
Most helpful comment
Simply link to the main repo, it's my understanding that cargo parse's the Cargo.toml at the url pointed to by 'git' parameter to look for repository names