I'm mapping ALL crates.io and their dependencies.

These are just 14341 crates (palindrome number and about 5.9% of crates.io) and it already seems something of cosmical proportions. Like some sort of megastructure. And we have some data!

Out of 14341 crates, 46% depend directly on tokio, 4.8% depend directly on syn, only 44 depend on a rustc_* internal crate, almost all of them being rustc_version and even being the most downloaded crate of all crates.io, only 166 depend on `hashbrown`.

#rust #opensource #foss

@blyxyas
Only 46% depend on tokio?
@mikalai @blyxyas I'm actually surprised it's that high. Tokio seems to most often be used as a dependency by applications, not libraries. If you don't need async file I/O or task scheduling you can write async code in a library using just std::future.
@tedmielczarek @mikalai @blyxyas if I were writing such a library (which I'm not, so ignoramus here), I would likely make some integration tests, and wouldn't those use tokio?

@gthb @mikalai @blyxyas you'd list tokio in dev-dependencies in that case: https://doc.rust-lang.org/rust-by-example/testing/dev_dependencies.html

I don't know the exact methodology used to generate the graph but it seems reasonable to treat dependencies and dev-dependencies separately.

Dev-dependencies - Rust By Example

Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.

@tedmielczarek @mikalai @blyxyas right, I was assuming dev-deps were included, but no reason to assume that. And I bet the difference is interesting in its own right!