Motivation
The README lists Python, TypeScript, Rust, and Julia as the four languages.
A scan of catalog.json shows the actual coverage today:
| Language |
Lessons |
Coverage |
| Python |
427 |
98.2% |
| Julia |
4 |
0.9% (Phase 1 only) |
| TypeScript |
2 |
0.5% (Phase 16 only) |
| Rust |
1 |
0.2% (Phase 10 L01 bpe.rs) |
I'd like to open a long-running track adding Rust implementations to lessons where Rust is a natural fit — pure algorithms, from-scratch math, byte-level work, inference internals. The existing phases/10-llms-from-scratch/01-tokenizers/code/bpe.rs already sets a clean precedent (single file, stdlib-only, lives alongside the Python version), and I'll follow that convention.
Approach
- One PR per lesson — keeps reviews fast (per CONTRIBUTING.md).
- Single
.rs file in the lesson's existing code/ directory, no Cargo.toml.
- Mirrors the Python's structure and printed output so readers can diff the two.
- README
Lang column updated to Python, Rust in the same PR; node site/build.js run.
First batch (proposed order)
- Phase 2 L02
linear-regression-from-scratch — pure stdlib math, classic starter
- Phase 2 L03
logistic-regression-classification
- Phase 3 L01
the-perceptron
- Phase 3 L03
backpropagation-from-scratch
- Phase 7 L02
self-attention-from-scratch
Happy to reorder if there are phases you'd rather see covered first.
Out of scope (for now)
- Lessons that depend on heavy framework parity (PyTorch/JAX internals).
- Lessons whose Python uses regex with lookarounds (e.g. Phase 10 L02) — Rust's
regex crate doesn't support these without an external dep. I'll revisit those after the no-deps baseline is established.
First PR coming shortly against Phase 2 L02. Will link it here.
Motivation
The README lists Python, TypeScript, Rust, and Julia as the four languages.
A scan of
catalog.jsonshows the actual coverage today:bpe.rs)I'd like to open a long-running track adding Rust implementations to lessons where Rust is a natural fit — pure algorithms, from-scratch math, byte-level work, inference internals. The existing
phases/10-llms-from-scratch/01-tokenizers/code/bpe.rsalready sets a clean precedent (single file, stdlib-only, lives alongside the Python version), and I'll follow that convention.Approach
.rsfile in the lesson's existingcode/directory, noCargo.toml.Langcolumn updated toPython, Rustin the same PR;node site/build.jsrun.First batch (proposed order)
linear-regression-from-scratch— pure stdlib math, classic starterlogistic-regression-classificationthe-perceptronbackpropagation-from-scratchself-attention-from-scratchHappy to reorder if there are phases you'd rather see covered first.
Out of scope (for now)
regexcrate doesn't support these without an external dep. I'll revisit those after the no-deps baseline is established.First PR coming shortly against Phase 2 L02. Will link it here.