# Rocket vs Axum: source lines of code compared

The Rocket vs Axum comparison on OctoCounts shows side-by-side source line counts for rwf2/rocket and tokio-rs/axum, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-13, rwf2/rocket contains 47,362 total lines (35,502 code) across 431 files, while tokio-rs/axum contains 38,113 total lines (28,536 code) across 273 files as of 2026-09-19. rwf2/rocket is about 1.2x the size of tokio-rs/axum by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [rwf2/rocket](https://octocounts.com/github/rwf2/rocket) | [tokio-rs/axum](https://octocounts.com/github/tokio-rs/axum) |
| --- | ---: | ---: |
| Files | 431 | 273 |
| Total lines | 47,362 | 38,113 |
| Code lines | 35,502 | 28,536 |
| Comment lines | 4,186 | 3,790 |
| Blank lines | 7,674 | 5,787 |
| Languages counted | 12 | 8 |

Top languages in rwf2/rocket: Rust (92.5% of code), TOML (2.3% of code), CSS (1.9% of code). Top languages in tokio-rs/axum: Rust (95.1% of code), TOML (4.4% of code), Jinja2 (0.1% of code). Rust, TOML appear in both top language lists; CSS, Shell, Tera appear only in rwf2/rocket's top languages; Jinja2, JavaScript, HTML appear only in tokio-rs/axum's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. rwf2/rocket was counted at ref 504efef179622df82ba1dbd37f2e0d9ed2b7c9e4 (commit 504efef17962) on 2026-09-13; tokio-rs/axum was counted at ref main (commit 3ea7f31b8e43) on 2026-09-19. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

rwf2/rocket counts the Rocket repository: a Rust web framework with its core, its procedural-macro codegen, documentation, and examples. tokio-rs/axum counts the Axum repository: a Rust web framework maintained by the Tokio team, built to compose with the Tower service ecosystem, with its own modules, examples, and tests. Both are framework source trees within the Rust async ecosystem, counted on the dates above.

Both repositories are written in Rust, as the per-language tables confirm, so the counted difference is in structure rather than language: Rocket's tree centers on a batteries-included framework with its own codegen macros, while Axum's tree concentrates on routing and handlers composed from the shared Tower/Hyper layers.

Each repository includes examples and documentation that exist to teach the framework's patterns rather than to ship as library code, a share of the totals that the language tables alone do not separate.

_A framework repository's size does not indicate request throughput, latency, or suitability for an application; those depend on the versioned crate and how it is used, not on the source tree's line count._

Sources: [rwf2/rocket repository](https://github.com/rwf2/rocket) · [tokio-rs/axum repository](https://github.com/tokio-rs/axum). Statements verified 2026-09-16.

Evidence and next steps:

- [rwf2/rocket SLOC report](https://octocounts.com/github/rwf2/rocket)
- [tokio-rs/axum SLOC report](https://octocounts.com/github/tokio-rs/axum)
- [Compare rwf2/rocket and tokio-rs/axum interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Frwf2%2Frocket&right=https%3A%2F%2Fgithub.com%2Ftokio-rs%2Faxum)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, rwf2/rocket or tokio-rs/axum?

rwf2/rocket has more code: 35,502 code lines versus 28,536 for tokio-rs/axum, about 1.2x as much, based on cached OctoCounts reports as of 2026-09-19.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for rwf2/rocket, tokio-rs/axum, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. rwf2/rocket was counted at ref 504efef179622df82ba1dbd37f2e0d9ed2b7c9e4 (commit 504efef17962) on 2026-09-13; tokio-rs/axum was counted at ref main (commit 3ea7f31b8e43) on 2026-09-19. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
