4 ms·
This is exactly my painpoint with C++ too. With Rust and such I'm one simple command line call away from installing a dependency. With C++ every dependency is a
by naavis 6y ago
This is exactly my painpoint with C++ too. With Rust and such I'm one simple command line call away from installing a dependency. With C++ every dependency is a battle.
- galangalalgol 6y agoThere is conan or vcpkg. I do wish crates.io and julia would make it easier to develop on non internet machines. The ease of dependency management has bred staggeringly deep dependency trees for rust and julia. If I could run a cargo command to get a human readable dependency list that I could then go to an internet facing machine and run a cargo command to put into a tgz to drag back over that would be helpful. Is there any progress on making a crates mirror for offline networks?
- shepmaster 6y agoA list of dependencies: https://doc.rust-lang.org/cargo/commands/cargo-tree.html https://doc.rust-lang.org/cargo/commands/cargo-tree.html Download all dependencies locally: https://doc.rust-lang.org/cargo/commands/cargo-vendor.html https://doc.rust-lang.org/cargo/commands/cargo-vendor.html
- galangalalgol 6y agoI think maybe I don't understand vendor. I thought you had to have your project on the internet facing machine to vendor its dependencies. Which I cannot do.
- shepmaster 6y agoLikewise, I don’t understand the disconnect. You have to have your list of dependencies on an internet connected machine, yes, but you already allowed that. You said: > I could then go to an internet facing machine and run a cargo command Copy over your Cargo.toml to that machine, run vendor, copy the vendor files back.
- galangalalgol 6y ago<sheepish headslap> thanks!
- deleted 6y ago[deleted]
- naavis 6y agoYes, Conan and vcpkg have gotten better lately, but that is a relatively recent development. Just two years ago I still had a hard time finding some common libraries with Conan. It's good that the situation is better now.
- maccard 6y agovcpkg install. It integrates with cmake too!
- naavis 6y agoThen again, for every project you have to then setup vcpkg and cmake. I thoroughly enjoy that Rust comes with a build system, package manager and test framework out-of-the-box. But it is good that the situation with C++ is getting better.
- maccard 6y agoYep no arguments there. It's not perfect, but it's nowhere near as bad as the article makes it out to be. Also, you only set up a project once, but it's compiled and iterated on many many more times. Having some initial friction isn't ideal but it's better to solve for the real problems which are maintaining a project.