All work

rust-with-typescript

Explaining Rust through concepts TypeScript developers already know

Context
Personal project
Scope
Fourteen-chapter curriculum, bilingual content, example validation, browser runner, and deployment
Stack
JavaScript, SCSS, Rust, MDX, TypeScript, Astro, Starlight, Axum, Cloudflare Workers

New syntax is only part of learning Rust

TypeScript developers need a bridge from familiar concepts to ownership, borrowing, and lifetimes. I built a learning environment that pairs examples and displays compiler feedback beside the explanation.

Running examples also turns a documentation site into an entry point to an execution service. The learning flow and the boundary on accepted requests needed to be designed together.

English home on the public Rust with TypeScript site · captured 2026-10-29
English home on the public Rust with TypeScript site · captured 2026-10-29 View original

Connect the curriculum, execution boundary, and deployment

Fourteen chapters built around familiar concepts

Astro and Starlight provide Korean and English content. Paired examples cover ownership, borrowing, enums, pattern matching, traits, error handling, and concurrency, explaining how the two type systems express the same problem.

Public Korean Ownership and Borrowing chapter in Rust with TypeScript · 2026-10-29
Public Korean Ownership and Borrowing chapter in Rust with TypeScript · 2026-10-29 View original

Separate the document from the Rust process

The site and execution API run on Cloudflare Workers and forward accepted examples to a separate Rust/Axum service. Code blocks display stdout, stderr, exit code, and duration, keeping compiler errors within the learning flow.

Accept examples included in the documentation

A build step generates a SHA-256 allowlist of runnable snippets. The API normalizes requests and rejects undocumented code before forwarding it, matching a product built for running examples rather than accepting arbitrary input.

The execution service limits concurrent compilations and per-IP requests, uses separate compile and run timeouts and per-run temporary directories, and truncates returned output.

Verify and publish the two parts

CI checks the Astro site and the Rust service separately through type checks, builds, clippy, and tests. Main-branch changes deploy to Workers before a version tag and GitHub Release are generated.

A published curriculum with an integrated execution flow

The project provides 14 chapters in Korean and English and an implemented in-document Rust execution flow. The Workers site, source, deployment workflow, and release history are publicly accessible.

The work extends from technical writing to build-time example validation, API and execution-service separation, feedback display, and release automation.

Resources and links

Learning guide
Learn concepts by comparing TypeScript and Rust examples side by side
Runnable examples
Run documented Rust examples and inspect output and compiler errors