Why I built a web framework in Rust — and why you shouldn’t
<p>In the early days of building <a href="https://patr.cloud/" rel="noopener ugc nofollow" target="_blank">Patr</a> (a DevOps management platform), our mission was clear: ensure stability, correctness, and minimal crashes for the applications under our care. Rust, with its strong focus on correctness and error handling, seemed like the ideal language. I recalled an application I crafted in Rust seven years ago that had <strong>never crashed</strong>, thanks to Rust’s rigor. But as we dove into the process, we unearthed both the benefits and pitfalls of building our own web framework, eve-rs.</p>
<h1><strong>The upside of Rust’s correctness</strong></h1>
<p>Rust’s ability to prevent entire classes of bugs through its ownership system and strict compiler checks was a game-changer. It was a key reason our server backup application had run flawlessly for seven years. This level of correctness reassured us as we embarked on building Patr — a platform meant to serve not only our users but also our user’s users. Rust seemed poised to reduce crashes and bolster stability.</p>
<h1><strong>The Rust Hiring Conundrum</strong></h1>
<p>Hiring experienced Rust developers proved harder than anticipated, especially as a startup. The language was fairly new and it doesn’t help that we are a startup, making us not so well-known. So a lot of talented developers are not keen on taking the risk. To bridge this gap, we created <a href="https://github.com/patr-cloud/eve-rs" rel="noopener ugc nofollow" target="_blank">eve-rs</a>, an HTTP framework mimicking ExpressJS. The aim was to hire relatively inexperienced, (but super enthusiastic) NodeJS developers by offering familiar patterns and minimal conceptual changes. The result? A niche framework tailored to our needs, although not well documented and confined to internal use. Feel free to check it out — <a href="https://github.com/patr-cloud/eve-rs." rel="noopener ugc nofollow" target="_blank">https://github.com/patr-cloud/eve-rs</a> . Just remember that not everything is documented well and most of it was meant for internal use.</p>
<p>To give you some context, let me give you an example. We would hire NodeJS developers, who were fluent in Express, and get them to use the boilerplate that we had built. A simple route in Node would look like this (it’s simplified, but you get the point):</p>
<p><a href="https://medium.com/@rakshith_ravi/why-i-built-a-web-framework-in-rust-and-why-you-shouldnt-59c4b15beb39">Click Here</a></p>