top | item 36866282

(no title)

boarnoah | 2 years ago

Doesn't rust suffer from the same, way too wide dependency web?

I feel like its an unfortunate consequence of having a good package manager which encourages proliferation of too many very small dependencies.

discuss

order

CoastalCoder|2 years ago

I'm new to Rust, and I noticed this just the other day.

I was playing with some Rust-based blockchain system, and the number of external dependencies pulled in (recursively) to build the code truly amazed me.

I don't really know, but I'm guessing that a similar C++ project would have required many fewer dependencies.

Maybe a C++ code base would tend rely on a small number of big libraries?

Or maybe a C++ code base would (for some reason) be more inclined to use binary libraries provided by already-installed Debian packages?

Night_Thastus|2 years ago

As a C++ dev, I generally see few but often large dependencies. Boost used to be a large one, but it's less relevant these days with C++11 and onward. There are others like QT, Eigen, GoogleTest, FFMpeg, Intel's OneAPI, etc.

Sometimes I see single-header libraries you can just drop in, other times I see large Cmake projects that you add as a dependency to compile when your project compiles.

I've never seen the kind of dependency chaining that languages like JS or Go show.

Thaxll|2 years ago

Actually Go does not suffer from that problem since it has a wide std lib, the original post took a liberate example of something that is not common.

layer8|2 years ago

This doesn’t need to be the case. It didn’t happen with Perl (CPAN) and Java (Maven), for example.

moojd|2 years ago

Do those allow multiple versions of the same dependency? With npm and cargo (as opposed to composer, etc.) you are never forced to resolve those types of conflicts so you can just keep installing dependencies forever without ever having to trim the tree.