typebridge
Cross-Language Type Synchronization SDK for Rust Define your types once in Rust. Get perfectly matching types in TypeScript, Python, Go, Swift, and Kotlin — automatically, forever.
Quick Start
[]
= "0.1.2"
= { = "1", = ["derive"] }
use TypeWriter;
use ;
// cargo build generates:
// ✅ ./generated/typescript/user-profile.ts
// ✅ ./generated/python/user_profile.py
Features
- TypeScript —
export interface, discriminated unions, optional fields - Python — Pydantic v2
BaseModel,Enum,UnionwithLiteraldiscriminators - Serde compatible — auto-reads
#[serde(rename, skip, tag, flatten)] - Custom attributes —
#[tw(skip)],#[tw(rename)],#[tw(optional)] - Zero-config — works out of the box, optional
typewriter.tomlfor customization
See the full documentation for more.
License
Apache-2.0 — Darshan Vichhi