Coding to Rust — a skill collection for migrating to Rust from many languages
Project overview
Coding to Rust is a Claude Code skill collection that provides a complete guide for migrating from 16 mainstream programming languages to Rust. For each language it offers:
- Architecture mapping — runtime differences, paradigm shifts, memory model comparisons
- Type system mapping tables — 30-80 precise type/syntax mappings
- Framework migration guides — how mainstream frameworks map to the Rust ecosystem (such as Django→Axum, Spring→Actix)
- Idiom comparisons — before/after comparisons with code examples
- Common mistakes — the mistakes developers from that language make most often in Rust, and how to fix them
- Incremental FFI migration strategy — a phased replacement plan
- Reference implementations — real-world migration cases and projects
Covered languages
| # | Language | Directory | Core paradigm shift |
|---|---|---|---|
| 1 | Python | python-to-rust/ |
GIL→true parallelism, asyncio→tokio, numpy/pandas→ndarray/polars |
| 2 | JavaScript/TypeScript | nodejs-to-rust/ |
event loop→tokio, V8→AOT, Express→Axum |
| 3 | Go | go-to-rust/ |
goroutine→tokio task, channel→mpsc, GC→ownership |
| 4 | Java | java-to-rust/ |
JVM→native binary, Spring→Axum, JPA→sqlx |
| 5 | C# | csharp-to-rust/ |
CLR→native, LINQ→iterators, ASP.NET→Axum |
| 6 | PHP | php-to-rust/ |
dynamic types→static types, FPM→long-running process, Laravel→Axum |
| 7 | C | c-to-rust/ |
malloc/free→ownership, pointers→references, header files→modules |
| 8 | C++ | cpp-to-rust/ |
templates→generics, virtual functions→traits, move semantics→ownership |
| 9 | Zig | zig-to-rust/ |
comptime→macros, allocators→ownership, error sets→Result |
| 10 | Lua | lua-to-rust/ |
table→struct/enum, metatable OOP→traits, coroutine→async |
| 11 | R | r-to-rust/ |
data.frame→polars, formula→builder, apply→iterators |
| 12 | Julia | julia-to-rust/ |
multiple dispatch→traits, JIT→AOT, Array→ndarray |
| 13 | Kotlin | kotlin-to-rust/ |
Coroutines→tokio, data class→struct, sealed class→enum, Gradle→Cargo |
| 14 | Swift | swift-to-rust/ |
ARC→ownership, actor→Mutex, protocol→trait, SwiftUI→Leptos |
| 15 | Ruby | ruby-to-rust/ |
GC→ownership, blocks→closures, Rails→Axum, Bundler→Cargo |
| 16 | Vue | vue-to-rust/ |
:warning: (frontend/WebAssembly — not backend) SFC→component functions, ref()→RwSignal, Vite→Trunk |
Project structure
1 | coding-to-rust/ |
Design principles:
- Index entry point —
SKILL.mdis the main entry, and Claude Code loads it automatically based on keywords - Independently readable — each language directory’s
SKILL.mdcan be used on its own, without depending on other files - Progressive depth — quick mapping tables (index layer) → architecture mapping (concept layer) → code examples (hands-on layer) → reference projects (verification layer)
- Cross-references — languages reference shared patterns across each other (for example, Python’s asyncio and Go’s goroutine both map to tokio)
Usage
How to trigger it
In a Claude Code conversation, any of the following will automatically load this skill:
- “Migrate this Python code to Rust”
- “Rewrite this Go service in Rust”
- “How do I implement Java’s Spring Boot in Rust”
- “Port this C++ class hierarchy to Rust”
- “Migrate Node.js Express app to Rust”
Workflow
- Auto-load — Claude Code recognizes the migration request and loads
coding-to-rust/SKILL.md - Quick mapping — look at the 6-8 core mappings for your language to quickly get the rough correspondence
- Deeper lookup — when you need code examples or detailed framework comparisons, Claude automatically reads the detailed
SKILL.mdfor that language - Cross-reference — for patterns shared across languages, it links to the corresponding sections in other languages via cross-references
Recommended migration order
Whichever source language you start from, it’s best to migrate in this order:
| Phase | Content | Approach |
|---|---|---|
| 1 | Data types | Define the corresponding Rust struct/enum, shared via a JSON/Protobuf schema |
| 2 | Pure functions | Migrate stateless logic first — no external dependencies, easiest to test |
| 3 | I/O boundaries | Replace HTTP handlers, database queries, file reads/writes |
| 4 | Concurrency model | Convert threads/coroutines/async tasks uniformly into tokio tasks |
| 5 | Full cutover | Remove the source language runtime, keeping only an FFI bridge for a compatibility transition |
File size reference
| Level | Corresponding file | Size | When to use |
|---|---|---|---|
| Light | Index layer quick mapping table | ~8 lines/language | Quick lookup to confirm basic mappings |
| Medium | Index layer general concepts | ~60 lines | Understand Rust’s core paradigms |
| Detailed | Each language’s SKILL.md | 600-1000 lines | Deep migration, code examples, framework comparisons |
Contributing
To add a language, fix an error, or improve the example code, edit the SKILL.md file for that language, and update the quick mapping table and links in the coding-to-rust/SKILL.md index as well.

