4 ms·
Keeping track of C/C++ dependencies is basically the point of Linux distros... Cargo's main problem is that it's (mostly) rust only. Same problem that pip/npm
by cozzyd 3y ago
Keeping track of C/C++ dependencies is basically the point of Linux distros...
Cargo's main problem is that it's (mostly) rust only. Same problem that pip/npm have, relegating you to (mostly) single-language silos.
- humanrebar 3y ago...except pip/npm often build C or C++ while packages install, at least in some cases. And Rust has the same issues, at least when shipping or consuming libraries with C APIs is in the picture.
- cozzyd 3y agoYes, sometimes, but it won't resolve C/C++ dependencies in general.
- josephg 3y ago> Keeping track of C/C++ dependencies is basically the point of Linux distros... Judging by the proliferation of docker I don’t think they’re doing a great job of even that. Docker shouldn’t be needed if apt was up to the task. Nixos is a much better design imo. > Cargo's main problem is that it's (mostly) rust only. True. But apt’s main problem is that it only works on a few distributions of Linux. Limiting the users of my rust library to rust developers is usually not a problem. Limiting the users of my rust library to the people who use homebrew or arch or something is not fine. And I don’t want to redo all the packaging work on every operating system and major Linux distribution. Life is too short for this make work BS. Especially given it could be automated away anyway. Rust packages already explicitly define all their dependencies. Why can’t apt just generate .dpkgs from my Cargo.toml? Apt’s other problems are that packages need to be installed globally. And they make a mess of versions. And there’s no feature flags. Run `apt search vim` some time and see how many packages they have! Or the same for llvm. It’s a dog’s breakfast. The time that cargo’s rust focus hurts it is with binary packages. It’s not enough for ripgrep to live in cargo since it’s designed to be useful for people who aren’t rust developers. And I don’t have a good answer for how to solve that. I wish I did.
- cozzyd 3y agoWe'll this also works for rust libraries as they're usually useless for other languages, whereas libraries like gdal, opencv, fftw, etc. can be used by many languages. (Though to be fair, until rust gets a stable ABI it's not going to be a good choice for this sort of thing). I personally consider docker/podman just completely punting on dependency management, and try to avoid them, but I'm probably in the minority...