logoalt Hacker News

fleventynineyesterday at 6:35 PM2 repliesview on HN

Many small crates published by large, trustworthy projects are fine and preferable to one large crate that "does everything".


Replies

zbentleyyesterday at 7:02 PM

Why?

Honest question. Commons, Guava, Spring, and more seem to take this approach successfully (as in, the drawbacks are outweighed by the benefits in convenience, quality, and security) in Java. Are benefits in binary size really worth that complexity?

And before someone says “just have a better standard library”, think about why that is considered a solution here. Languages with a large and capable standard library remain more secure than the supply-chain fiascos on NPM because they have a) very large communities reviewing and participating in changes and b) have extremely regulated and careful release processes. Those things aren’t likely to be possible in most small community libraries.

show 2 replies
vsgherziyesterday at 6:49 PM

Yeah I’d agree that multiple crates under one project is basically the same as 1 large crate. The real problem is how many people you’re trusting and it’s all coming from the same person.