mrDIMAS / rusty-shooter

[suspended] 3d shooter written in Rust using rg3d
MIT License
279 stars 25 forks source link

[cargo] Import dependencies from git instead of local path #4

Closed southerntofu closed 3 years ago

southerntofu commented 4 years ago

I just built rusty-shooter on my machine. I think the setup could be simpler if the Cargo.toml file referenced a git repository (in addition to the version from crates.io) for dependencies instead of a path.

If all rg3d crates did this, we could just:

git clone https://github.com/mrDIMAS/rusty-shooter
cd rusty-shooter
cargo run --release

See cargo docs about multiple locations for a crate.

mrDIMAS commented 4 years ago

I'm afraid this won't work for development - I'm changing other rg3d-x libraries at the same time while I'm writing engine or game. The docs clearly tells that you can't have path and git at the same time. Correct me if I'm wrong.

Eragonfr commented 4 years ago

We can add a simple shell/bat file for the of setup all repository, or using the git native function of subrepository ? That can make it more simple to use

mcuelenaere commented 3 years ago

You could setup a workspace and override the dependencies, eg like done at https://github.com/rust-lang/cargo/issues/6126

mrDIMAS commented 3 years ago

Closing this because I added workspace for rg3d and now there is no need to manually download 4 deps, just rg3d is enough.