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.
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.
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.
Trace
- 14 chapters
- TypeScript and Rust comparisonsKorean and English
- SHA-256
- Documented-example execution allowlist
- Workers + Axum
- Separate documentation and execution services