logoalt Hacker News

morning-coffeeyesterday at 9:04 PM3 repliesview on HN

> I want less code. I want to limit the amount of 3rd party code I pull in. This is mostly due to supply chain disasters over on NPM scaring me and the amount of code dependencies bringing in see rust dependencies scare me.

`anyhow` has exactly one optional dependency (backtrace). `thiserror` has three (proc-macro2, quote, syn) which are at the base of practically the entire Rust ecosystem.

Unless the author has zero dependencies in general, I'll bet they have all of the above dependencies already.

¯\_(°ペ)_/¯


Replies

craftkillertoday at 10:29 AM

nit: `thiserror` has 4 dependencies (proc-macro2, quote, syn, unicode-ident). Indirect dependencies are still dependencies.

vsgherziyesterday at 9:23 PM

Anyhow itself is still a dependency. This is more something I wanted to do and not something I recommend for everyone. Google took a similar approach in how they added rust for chrome. They don’t use an error handling library.

khueyyesterday at 9:14 PM

From a supply chain security perspective it's worth noting that a version of backtrace already ships in the standard library too.