3 ms·
> But to flip this around, let's say you want to use this third party in some other "modern" language how would this become better?. Clearly if someone hadn't d
by kouteiheika 2y ago
> But to flip this around, let's say you want to use this third party in some other "modern" language how would this become better?. Clearly if someone hadn't done the work to package in vcpkg/conan you can expect it wouldn't exist in pip/cargo/npm either. So if you had a bad time in C++, you would have a dramatically worse time in other languages.
Err, no?
In case of Rust usually there is really no work that's necessary to package it and upload. You just type `cargo publish` and you're done (after filling out metadata in Cargo.toml). Even if someone wouldn't upload it to crates.io as a Rust crate you can just add a single line to your Cargo.toml:
package_name = { git = "https://github.com/user/repo", rev = "revision" }
and you're done, you can use it as a dependency.
- dgfitz 2y agoI think you moved the goalposts. I can configure a CMake file to pull a GitHub repo, which seems similar enough.
- Spivak 2y agoI think the difference is that you can pip install a github url and it will work, it will even work if the upstream has done nothing to package it. I think the issue could be broadly defined as how difficult it is how difficult it is to take someone else's code and use it as part of your project. For C/C++ the answer can be completely trivial to a massive pain in the ass.
- mattpallissard 2y agoOh I dunno. With cmake it really is pretty straight forward. You can pull from VCS, a tarball, even use a git submodule. If it's another Cmake project, that's the happy path. Easy peasy. If it's not you still have the ability to run ./configure && make or evoke whatever incantation is in the dependency's requirements. I'm not the hugest fan of cmake, but I've worked with it quite a bit and it's a much more pleasant story than other languages I've used a lot like python, JavaScript, OCaml (which I love), etc. I do find rust and go dependency management a little simpler due to the prescribed nature of them, but once you get off the happy path, the flexibility of C land is tough to beat. It sort of matches the language stories themselves; you have more control and have to do a bit more yourself. It's all about trade offs.
- rddbs 2y agoHow often do folks venture off the happy path with Rust dependencies? Personally I’ve never once found myself in that situation.
- AlotOfReading 2y agoI've done it before to integrate rust into polyglot build systems. There's a surprisingly long history of build systems trying and failing to implement rust builds without the "happy path" of simply wrapping cargo. As far as I know no one's ever succeeded.