HN
Today

Farewell Rust

A solo developer shares a poignant farewell to Rust for web development, detailing the practical struggles that led him back to Node.js. This story unpacks common pain points like compilation times and ecosystem maturity for web apps, sparking a vibrant discussion about the 'right tool for the job' and Rust's evolving role.

37
Score
17
Comments
#10
Highest Rank
3h
on Front Page
First Seen
Feb 19, 8:00 PM
Last Seen
Feb 19, 10:00 PM
Rank Over Time
102127

The Lowdown

The author recounts his journey from C to Rust, initially embracing Rust for its blend of low-level control and modern tooling. After successfully building and shipping a revenue-generating web application in Rust, he ultimately decided to migrate it to Node.js due to persistent challenges.

  • Templating Troubles: Rust's templating options lacked the type-safety and developer experience found in TypeScript/Astro.
  • Internationalization Gaps: Node.js offers superior Intl APIs and mature libraries like i18next, which Rust's ecosystem is still catching up on.
  • Dynamic Web Nature: Rust's safety mechanisms led to boilerplate for error handling, and dynamic SQL queries with sqlx were cumbersome.
  • Compilation Time Headaches: Rust's long compilation times (up to 14 minutes in CI/CD) significantly hampered rapid iteration compared to Node.js's 5-minute deploys.
  • Ecosystem Maturity: For web-specific needs, Rust's ecosystem was often lacking, requiring custom implementations for obscure APIs or common web functionalities.

While acknowledging Rust's strengths for CPU-heavy or non-visual tasks, the author concludes that for a solo founder building a web application, Node.js currently provides a more pragmatic, integrated, and productive environment, offering a better 'type-safety' experience for web components and faster iteration cycles.

The Gossip

Rust's Web Woes and WASM Wonders

Many commenters acknowledged that while Rust excels in certain backend or API scenarios, its maturity for full-stack web development, particularly frontend-heavy tasks or HTML templating, lags behind the highly mature TypeScript/React ecosystem. There was a debate about the viability of WebAssembly (WASM) with Rust, with some finding it promising for certain components and others highlighting performance issues (especially in serverless environments like Cloudflare Workers) and ergonomic challenges when interacting with Web APIs or generating OpenAPI clients. The general consensus is that 'Rust for Web' isn't a universally solved problem.

Database Dilemmas & ORM Outcomes

The author's struggle with dynamic SQL queries in `sqlx` sparked a discussion about Rust's database tooling. One commenter championed `sea-orm` as a more ergonomic alternative, offering a type-safe query builder without requiring a live database connection, and praising its clear distinction between active records and direct DB requests. Another commenter, however, defended `sqlx`'s strictness regarding dynamic queries, arguing that making them harder promotes safety against SQL injection, highlighting a trade-off between flexibility and security in database interactions.

Pragmatism and Platform Ponderings

Commenters weighed in on the broader developer experience, contrasting Rust with alternatives like Go and Node.js. Many highlighted Go's strong standard library and stability as a significant advantage, particularly for solo developers prioritizing 'getting crap done' over managing complex ecosystems. The discussion touched on the trade-off between Go's slower iteration but stable core versus Rust's faster, ecosystem-driven evolution which can lead to more churn and dependency issues. Compilation times, a major point in the article, were acknowledged as a persistent challenge for larger Rust projects, regardless of hardware.