{"slug": "100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-it-s-a-mess-with-a-demo", "title": "100k lines of TypeScript to Rust via LLM is not a port. It's a mess with a demo.", "summary": "A developer criticized claims of converting 100k lines of TypeScript to Rust in a month using an LLM, arguing that such ports are unreliable because they lack a ported test suite and introduce subtle bugs. The developer emphasized that functional code is not equivalent to working code, and that LLMs reinterpret logic rather than faithfully translate it, leading to production issues that demos do not reveal.", "body_md": "A person boasted that they converted 100k lines of TypeScript to Rust in a month with the help of an LLM. Now, folks are treating this accomplishment as if it’s some phenomenal leap.\n\nNo, it's not real. It's a mass hallucination with a compile step.\n\nThe idea is certainly appealing. You just need to direct an AI to your codebase, leave it to process throughout the night, and next morning you have a new polished Rust rewrite. It's faster, safer, and more memory-efficient. What else could you ask for?\n\nHowever, there is an uncomfortable truth that not many people talk about: **functional code is not equivalent to working code.** Certainly, the Rust compiler is very unforgiving. It will catch all of your memory errors. But it will not catch errors in your business logic. It will not catch silent corruption in your data. It will not catch that pesky off-by-one error hiding right behind that perfectly reasonable match arm.\n\nThis is the part that's hardest for me to accept. Whenever you're transferring 100k lines of any code from one thing to another, the first element you transfer is the test suite. Not the application code. The tests.\n\n→ Tests are the **specification**. Without them, you have no way to verify the port is correct.\n\n→ Tests catch the subtle behavioral differences between languages — how they handle nulls, floats, async boundaries.\n\n→ Tests are what turn \"it compiles\" into \"it actually does the same thing.\"\n\nNobody in these viral stories talks about porting the tests first. Because that's the boring, hard, unglamorous part. And because LLMs are terrible at it — test logic is deeply coupled to runtime behavior that the model has never observed.\n\nIf there is no ported test suite, it essentially means that there is no ported application either.\n\nThere's a subtle danger nobody tells you about. If you ask an LLM to translate TypeScript into Rust, it won't perform a faithful translation. It will *reinterpret*. It will *optimize*. It will perceive a familiar pattern and replace it with what it believes to be the idiomatic Rust equivalent.\n\nOccasionally, that's acceptable. Occasionally, it modifies error handling behavior without you noticing. Occasionally, it adjusts the asynchronous flow in a functionally distinct manner when the system is under heavy load. Occasionally, it excludes a particular scenario because it was deemed unnecessary based on the training data. 🫠\n\nThese are not compilation errors. These are bugs you get in production at 3 AM because a particular combination of inputs triggered a code path that the Learning Model 'thought' needed to be “cleaned up.”\n\nA human porter will ask questions for clarification if they don't understand something. In contrast, an LLM will simply produce a whole lot of plausible garbage and proceed to the next document.\n\nThe scariest part? These ports often *demo perfectly*. The happy path works. The basic API calls return the right shapes. You can stand on a stage or record a screen share and it looks incredible.\n\nThis is because LLMs have been designed to perform this task precisely- generating an output that seems accurate for a human reader. The bugs are in the infrequent cases- the edge situations, the race problems, the strange state changes that could only be detected by your test suite (the one that was not transferred).\n\nI've seen this pattern before with regular code generation. The code looks clean. It even looks *better* than what a human would write. And then you trace a bug for two days and realize the AI invented a function signature that doesn't match the actual contract. 😅\n\nA true port is not exciting. It's very systematic. It goes module by module with tests running green at every step. Converting 100k lines of code in a real port isn't something you do in a matter of weeks either. It involves humans making judgment calls about architectural differences between the source and target language.\n\n→ Port the tests first\n\n→ Port module by module, validating against those tests\n\n→ Flag every spot where language semantics diverge\n\n→ Accept that some things need to be **redesigned**, not translated\n\nThat's not a sexy story. It doesn't go viral. But it produces software that actually works.\n\nI'm not anti-AI in code. I use LLMs daily. They're great for boilerplate, exploration, and rubber-ducking. But there's a canyon between \"AI helped me write some Rust\" and \"AI ported our entire production codebase.\" 🔥\n\nCelebrating unverified ports as engineering achievements sets a dangerous precedent. It tells teams that rigor is optional if the vibes are right.\n\n**So here's what I want to know: have you actually shipped an LLM-generated port to production? What broke first?**", "url": "https://wpnews.pro/news/100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-it-s-a-mess-with-a-demo", "canonical_source": "https://dev.to/adioof/100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-its-a-mess-with-a-demo-fa6", "published_at": "2026-06-30 13:10:15+00:00", "updated_at": "2026-06-30 13:19:20.608097+00:00", "lang": "en", "topics": ["large-language-models", "developer-tools", "ai-tools"], "entities": ["TypeScript", "Rust", "LLM"], "alternates": {"html": "https://wpnews.pro/news/100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-it-s-a-mess-with-a-demo", "markdown": "https://wpnews.pro/news/100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-it-s-a-mess-with-a-demo.md", "text": "https://wpnews.pro/news/100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-it-s-a-mess-with-a-demo.txt", "jsonld": "https://wpnews.pro/news/100k-lines-of-typescript-to-rust-via-llm-is-not-a-port-it-s-a-mess-with-a-demo.jsonld"}}