In a DEV Community post, @nyaomaru (nyaomaru) explains why the open-source CLI tool type-tune was rewritten from TypeScript to Rust, and what that migration cost in practice. The original article is available at https://dev.to/necoz/why-i-rewrote-type-tune-from-typescript-to-rust-1egg.
type-tune finds shared TypeScript types and helps move them to a better location without manually updating imports, dependencies and barrel exports. The first implementation was written in TypeScript and was already complete by September, at nearly 20,000 lines including tests, comments and blank lines. After watching a video by DHH, the author wondered whether a Rails-to-Rust move could be mirrored as TypeScript-to-Rust.
Why the rewrite was feasible
Because a working implementation, design documents, tests and well-defined types already existed, the author says the migration was completed in under a month as a side project, with AI assistance. A data model translated fairly directly, for example a union of string literals plus an object type becoming an enum and a struct with String and Vec<String> fields.
The reported results were better execution performance, native binary distribution, and no Rust toolchain required for npm users. The tool is still installed like a familiar TypeScript dev dependency:
pnpm add -D type-tune
The npm launcher requires Node.js 22+, while the core runs as a native binary.
The new bottleneck: the developer
The author is candid that the tool got faster while its developer got slower. Rust ownership and borrowing, visibility boundaries (pub, pub(crate), private) and macro usage all require judgement that AI-generated code does not supply. The compiler accepts several declarations that represent different architectural decisions, and a generated .clone() may be unnecessary where borrowing would do. The post summarises the situation as AI generating Rust code faster than the author can understand it.
The author rejects pure vibe coding on the grounds that producing things without understanding them erodes the ability to create, and does not regret choosing Rust.
Scan, Plan, Apply
The architecture stayed the same through the migration. scan analyses exported type aliases, interfaces and references without modifying source. plan writes a JSON file and a human-readable, editable Markdown plan in which every candidate is ignored by default; the developer approves candidates and can change destinations. apply previews with --dry-run, then rewrites imports, leaves a compatibility re-export in the original module, validates with the TypeScript compiler and rolls back if validation fails. An optional --ai-review flag adds review notes but does not control the rewrite.
The stated philosophy is to automate the tedious work without taking architectural decisions away from developers.