Contributing
Contributions of all kinds are welcome — from fixing a typo to writing a whole new chapter.
Ways to Contribute
Section titled “Ways to Contribute”| Type | Description |
|---|---|
| Fix an error | Incorrect explanation, broken code, outdated content |
| Improve content | Clearer wording, better examples |
| Add a chapter | Propose and write a new topic |
| Translate | English ↔ Korean, or help add a new language |
| Report a bug | Broken UI, code runner issues, broken links |
Getting Started
Section titled “Getting Started”git clone https://github.com/qtaghdi/rust-with-typescript.gitcd rust-with-typescriptbun installbun run dev # → http://localhost:4321Content Structure
Section titled “Content Structure”Chapters live in src/content/docs/:
src/content/docs/├── ch0-intro.md ← English├── ch1-mental-model.md├── ...└── ko/ ├── ch0-intro.md ← Korean ├── ch1-mental-model.md └── ...Keep both languages in sync. When you edit an English chapter, update the Korean version too (or note it in your PR).
Editing a Chapter
Section titled “Editing a Chapter”- Open the file in
src/content/docs/(English) orsrc/content/docs/ko/(Korean) - Edit the Markdown
- Run
bun run devto preview - Open a PR
Adding a New Chapter
Section titled “Adding a New Chapter”- Create
src/content/docs/ch{N}-topic.mdandsrc/content/docs/ko/ch{N}-topic.md - Add it to
sidebarinastro.config.mjswith bothlabelandtranslations.ko - Follow existing chapter structure:
- Frontmatter:
title,description - TypeScript ↔ Rust side-by-side comparisons
- Summary section at the end
- Glossary links for key terms
- Frontmatter:
Runnable Code Blocks
Section titled “Runnable Code Blocks”Add the runnable flag to make a Rust block executable in the browser:
```rust runnablefn main() { println!("Hello!");}```After adding runnable blocks, regenerate the hash file:
node scripts/generate-hashes.mjsbun run build does this automatically. For local dev you need to run it manually once.
Commit Style
Section titled “Commit Style”We follow Conventional Commits:
fix: correct borrow checker example in ch3feat: add chapter on error handling patternsdocs: improve lifetime syntax explanationOpening an Issue
Section titled “Opening an Issue”Use one of the issue templates on GitHub:
- Content Error — incorrect explanation, broken code
- New Chapter Proposal — suggest a topic
- Bug Report — site/UI issues