Why Rust is the Ideal Language for Vibe-Coding — Daniel Szoke, Sentry

Categories: AI, Tools

Summary

Rust is unexpectedly better for AI-assisted coding than Python/TypeScript because its strict constraints force LLMs to write correct code upfront—while dynamic languages make it easy for models to generate buggy code that passes initial tests, Rust's compiler acts as an automated guardrail against LLM errors.

Key Takeaways

  1. TypeScript recently became GitHub's #1 language by contributor count, primarily driven by AI-assisted development adoption, displacing Python from the top position.
  2. LLM ease-of-use for a language may be inversely correlated with code safety—dynamic languages like Python/JS are easy for models to write but equally easy to write buggy code in, while strict languages like Rust force correctness.
  3. Tests and code review agents have fundamental limitations: they can only prove incorrectness when they fail, can't test every input combination, and LLMs often write tests after implementation testing implementation details rather than actual behavior.
  4. Treat LLM errors like human errors requiring preventive guards—since LLMs are inherently non-deterministic and fallible by design, rely on compile-time constraints rather than runtime testing as the primary safety mechanism.
  5. Distinguish between 'artificial' and 'alien' intelligence: LLMs operate with fundamentally different internal logic than humans, requiring entirely different architectural assumptions when building agentic systems.

Related topics

Transcript Excerpt

My name is Daniel Zook. I'm uh the Rust SDK maintainer at Sentry and I want to tell you why I think Rust is the ideal language for vibe coding. So, the conventional wisdom on what language to use for agentic coding or vibe coding, however you refer to it, um it's Rust is probably not one of the first things you think of. Um You know, maybe you think you know, probably chat GPT has a good idea, what's the best agentic coding language given that it's also a an agent of some sort. And it would tell you that there's no single number one language, um but that Python is probably the top language, um and as a strong number two, it said JavaScript and TypeScript when I asked it. Um and I think that this is in, at least my experience, pretty true, although I would flip the order because um TypeScri…

More from ai.engineer