# Yew vs Leptos: source lines of code compared

The Yew vs Leptos comparison on OctoCounts shows side-by-side source line counts for yewstack/yew and leptos-rs/leptos, 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-16, yewstack/yew contains 162,519 total lines (62,057 code) across 1,441 files, while leptos-rs/leptos contains 128,043 total lines (107,502 code) across 1,072 files as of 2026-09-15. leptos-rs/leptos is about 1.7x the size of yewstack/yew by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [yewstack/yew](https://octocounts.com/github/yewstack/yew) | [leptos-rs/leptos](https://octocounts.com/github/leptos-rs/leptos) |
| --- | ---: | ---: |
| Files | 1,441 | 1,072 |
| Total lines | 162,519 | 128,043 |
| Code lines | 62,057 | 107,502 |
| Comment lines | 71,498 | 7,395 |
| Blank lines | 28,964 | 13,146 |
| Languages counted | 12 | 12 |

Top languages in yewstack/yew: Rust (53.7% of code), JSON (39.2% of code), Sass (2.2% of code). Top languages in leptos-rs/leptos: Rust (85.6% of code), TOML (5.3% of code), JSON (4.6% of code). Rust, JSON, TOML appear in both top language lists; Sass, JavaScript appear only in yewstack/yew's top languages; Gherkin (Cucumber), CSS appear only in leptos-rs/leptos's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. yewstack/yew was counted at ref 54c20db6cf0f6a3e7b885eb1b6c7b5637bbcb17e (commit 54c20db6cf0f) on 2026-09-16; leptos-rs/leptos was counted at ref 6f09f085f79fa903c36d93c659cf3a33536d176a (commit 6f09f085f79f) on 2026-09-15. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

yewstack/yew counts Yew: a Rust framework for writing web frontends that compile to WebAssembly, with its core, examples, and website content. leptos-rs/leptos counts Leptos: a newer Rust web framework built around fine-grained reactivity, also compiling to WebAssembly and additionally supporting server-side rendering. Both are Rust frontend-framework source trees, counted on the dates in the methodology line.

Both counted trees are predominantly Rust as the per-language tables show, so the totals can be compared as two implementations of the same general idea — a Rust-authored frontend — rather than as different layers of a stack.

Leptos's counted tree includes its server-side rendering and meta/framework support code alongside the client framework, while Yew's centers on the in-browser WASM framework, so part of the total difference reflects how much of the full stack each repository keeps in one tree.

_These counts are framework source, not what ships to a browser: a compiled WASM bundle contains a subset of this code plus the application itself, and neither total measures runtime performance or bundle weight._

Sources: [yewstack/yew repository](https://github.com/yewstack/yew) · [leptos-rs/leptos repository](https://github.com/leptos-rs/leptos). Statements verified 2026-09-16.

Evidence and next steps:

- [yewstack/yew SLOC report](https://octocounts.com/github/yewstack/yew)
- [leptos-rs/leptos SLOC report](https://octocounts.com/github/leptos-rs/leptos)
- [Compare yewstack/yew and leptos-rs/leptos interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fyewstack%2Fyew&right=https%3A%2F%2Fgithub.com%2Fleptos-rs%2Fleptos)

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, yewstack/yew or leptos-rs/leptos?

leptos-rs/leptos has more code: 107,502 code lines versus 62,057 for yewstack/yew, about 1.7x as much, based on cached OctoCounts reports as of 2026-09-16.

### 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 yewstack/yew, leptos-rs/leptos, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. yewstack/yew was counted at ref 54c20db6cf0f6a3e7b885eb1b6c7b5637bbcb17e (commit 54c20db6cf0f) on 2026-09-16; leptos-rs/leptos was counted at ref 6f09f085f79fa903c36d93c659cf3a33536d176a (commit 6f09f085f79f) on 2026-09-15. 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)
