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 under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

This page compares the source lines of code (SLOC) of yewstack/yew and leptos-rs/leptos using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-10-31, yewstack/yew contains 179,585 total lines (65,786 code) across 1,493 files, while leptos-rs/leptos contains 138,600 total lines (116,050 code) across 1,098 files as of 2026-11-12. leptos-rs/leptos has about 1.8x the counted code lines of yewstack/yew under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricyewstack/yewleptos-rs/leptos
Files1,4931,098
Total lines179,585138,600
Code lines65,786116,050
Comment lines81,2418,371
Blank lines32,55814,179
Languages counted1617

Top languages in yewstack/yew: Rust (55.0% of code), JSON (37.7% of code), TOML (2.1% of code). Top languages in leptos-rs/leptos: Rust (86.3% of code), TOML (4.9% of code), JSON (4.3% 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 master (commit bfa6c19af971) on 2026-10-31; leptos-rs/leptos was counted at ref main (commit 143458789912) on 2026-11-12. See the counting methodology for ignored directories and analysis options.

Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. yewstack/yew: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. leptos-rs/leptos: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

About this comparison

Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: yewstack/yew contains Yew: a Rust framework for writing web frontends that compile to WebAssembly, with its core, examples, and website content. leptos-rs/leptos contains 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 · leptos-rs/leptos repository. Statements verified 2026-09-16.

Evidence and next steps:

Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.

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?

As of 2026-10-31, yewstack/yew contains 179,585 total lines (65,786 code) across 1,493 files, while leptos-rs/leptos contains 138,600 total lines (116,050 code) across 1,098 files as of 2026-11-12. leptos-rs/leptos has about 1.8x the counted code lines of yewstack/yew under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

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 master (commit bfa6c19af971) on 2026-10-31; leptos-rs/leptos was counted at ref main (commit 143458789912) on 2026-11-12. 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.