Tokio
RustAsynchronous runtime for Rust
Tokio's largest reported cycle (89 modules) spans 3 crates, but only through test code. In Rust, module cycles inside a crate are normal structure, not a defect.
Call resolution (36,368 call sites)
- Resolved in the repository
- 4,291
- To libraries or the standard library
- 14,597
- Ambiguous (several possible targets)
- 378
- Unresolved (could be repo code)
- 17,102
The rate above is resolved ÷ (resolved + ambiguous + unresolved). Calls to libraries and the standard library cannot reach this repository, so they are shown separately and left out of it. Test code is included in these counts.
What the analysis shows
The largest group links tokio, tokio-stream and tokio-test. Cargo does not allow cycles between normal crate dependencies; this one exists because tokio/src/task/coop/mod.rs contains a #[cfg(test)] module with use tokio_test::*. We checked the source. The analyzer does not mark Rust test code as test-only, so such cycles are reported as if they were production structure.
Modules of one crate may refer to each other freely, so the other groups describe how tightly parts of a crate are bound rather than a defect. For example, the second-largest group (38 files) joins tokio/src/fs with the io_uring driver code under tokio/src/runtime/io. Such cycles limit how code could be split into separate crates; they do not cause load-order problems.
tokio/src/io/mod.rs is imported by 177 modules.
36,368 call sites; 12% resolve inside the repository. fs::asyncify, the helper Tokio's file-system functions use to run blocking work, is called from 24 files.
Re-analyzed with the current analyzer, the same commit gives the same files, module dependencies and cycles as the October demo (814 files, 2,067 module dependencies, 20 cycle groups). More calls resolve: 4,291 inside the repository, against 3,398 in October. Method calls on typed parameters and struct fields, and builder chains whose methods return Self, now resolve. The analysis took 22.6 s with a peak of 265 MB (October: 33.5 s, 262 MB).
Largest cycle group
- tokio-stream/src/empty.rs
- tokio-stream/src/iter.rs
- tokio-stream/src/lib.rs
- tokio-stream/src/once.rs
- tokio-stream/src/pending.rs
- tokio-stream/src/stream_close.rs
- tokio-stream/src/stream_ext.rs
- tokio-stream/src/stream_ext/all.rs
- tokio-stream/src/stream_ext/any.rs
- tokio-stream/src/stream_ext/chain.rs
- tokio-stream/src/stream_ext/collect.rs
- tokio-stream/src/stream_ext/filter.rs
- tokio-stream/src/stream_ext/filter_map.rs
- tokio-stream/src/stream_ext/fold.rs
- tokio-stream/src/stream_ext/fuse.rs
- tokio-stream/src/stream_ext/map.rs
- tokio-stream/src/stream_ext/map_while.rs
- tokio-stream/src/stream_ext/merge.rs
- tokio-stream/src/stream_ext/next.rs
- tokio-stream/src/stream_ext/peekable.rs
- tokio-stream/src/stream_ext/skip.rs
- tokio-stream/src/stream_ext/skip_while.rs
- tokio-stream/src/stream_ext/take.rs
- tokio-stream/src/stream_ext/take_while.rs
- tokio-stream/src/stream_ext/then.rs
- tokio-stream/src/stream_ext/try_next.rs
- tokio-stream/src/stream_map.rs
- tokio-stream/src/wrappers.rs
- tokio-stream/src/wrappers/mpsc_bounded.rs
- tokio-stream/src/wrappers/mpsc_unbounded.rs
30 of 89 shown
Most widely called symbols (calling files)
- tokio/src/fs/mod.rs#asyncify (24)
- tokio-test/src/task.rs#spawn (23)
- tokio/src/process/mod.rs#Command.new (12)
- tokio/src/signal/unix.rs#signal (12)
- tokio/src/util/linked_list.rs#LinkedList < L >.new (12)
- tokio/src/process/mod.rs#Command.spawn (10)
Compared with the October 2026 demo
The same commit, analyzed again with the current analyzer. Both columns use the same definitions; differences come from analyzer changes, explained in the findings above where they matter. The October demo recorded only the resolved-call count, so the other call-resolution rows show the current analyzer only.
| Measure | October 2026 demo | Current analyzer |
|---|---|---|
Files analyzed graph nodes (Go: packages) | 814 | 814 |
Source lines (SLOC) non-blank, non-comment lines of analyzed files | 106,490 | 106,490 |
Module dependencies distinct file-to-file links, test-only and name-match links excluded | 2,067 | 2,067 |
Relationship records all edge rows of every kind, including links to external symbols | 3,726 | 3,726 |
Cycle groups groups of files that depend on each other | 20 | 20 |
Largest cycle (files) size of the largest cycle group | 89 | 89 |
Most-imported module distinct production importers of the top module | 177 (mod.rs) | 177 (mod.rs) |
Call sites resolved in repo calls resolved to a function inside the repository / all call sites | 3,398 / 36,368 | 4,291 / 36,368 |
Calls to libraries (external) calls into other packages or the language's standard library | n/a | 14,597 |
Ambiguous calls calls with several possible targets inside the repository | n/a | 378 |
Unresolved calls calls that could reach repository code but were not pinned to a target | n/a | 17,102 |
Resolved of in-repo calls resolved / (resolved + ambiguous + unresolved): external calls cannot reach the repository | n/a | 20% |
Framework registrations routes, handlers, hooks, entry points with resolution status | 3 | 3 |
Architectural zones package-hierarchy zones | 100 | 100 |
Analysis time (s) wall time of the analysis call | 33.5 | 22.6 |
Peak memory (MB) container memory peak during the analysis | 262 | 265 |
Limitations
- Integration tests under
tokio/testsare not classified as tests (4 test files reported), so test-related views undercount. - 47% of call sites stay unresolved, mostly method calls on receivers whose type is inferred by the compiler.
- Static analysis records relationships visible in the source. It does not see dynamic loading, reflection, or behaviour at runtime; verify important conclusions in the code.
Download the analysis
A full bundle of a large repository exceeds many models' context windows; the focused slices below answer one question each in a fraction of the size.
Focused slices
Every cycle group with its members and size.
scc-summary
The most depended-on and most dependent files, with the reasons they rank high.
hub-summary
Everything that depends on the main hub, two levels deep.
blast-radius
Test-side callers reachable from the most-called symbol (see limitations).
affected-tests
Detected frameworks and how their registrations were resolved.
framework-summary
Resolved calls to the most-called symbol, with call sites.
call-diagnostics
Ready to run this on your own codebase?
Hosted analyses use the same analyzer as this demo, within your usage limits.