←back to thread

319 points levkk | 6 comments | | HN request time: 0.001s | source | bottom

Hi everyone,

I've been "funemployed" for a few months and with all that free time and idle hands I wrote a full web framework (think Rails, not Flask) for Rust.

It's boring old MVC, has its own ORM, templates, background jobs, auth, websockets, migrations and more. If you're keen but don't feel like rewriting your app in a different language, Rwf has a WSGI server to run Django (or Flask) inside Rust [1], letting you migrate to Rust at your own pace without disrupting your website.

I think Rust makes a great prototyping and deploy straight to production language. Now it has yet another framework for y'all to play with.

Cheers!

[1] https://levkk.github.io/rwf/migrating-from-python/

Show context
the__alchemist ◴[] No.41915053[source]
Love it; this is a big gap in Rust's ecosystem IMO.
replies(1): >>41915226 #
culi ◴[] No.41915226[source]
Is it? Asking as someone not very tuned into the ecosystem. Based on TechEmpower's Web Framework Benchmarks[0] and AreWeWebYet's resounding "yes!" for years now[1] I always got the impression that there were quite a few options available.

Rocket, Actix, Axum, Salvo, etc just to name a few. Each with different focuses (e.g. performance vs "batteries-included-ness")

[0] https://www.techempower.com/benchmarks/#hw=ph&test=composite...

[1] https://www.arewewebyet.org/

replies(3): >>41915283 #>>41915353 #>>41916184 #
1. the__alchemist ◴[] No.41915283[source]
Great question!

The frameworks you listed are not a direct comparison to this lib, nor Rails, nor Django. They are Flask analogs. They are ideal for microservices, but are not a substitute for a batteries-included framework of the sort used in websites.

I love rust, but don't use it for web backends because there is nothing on Django's level.

replies(3): >>41915421 #>>41915535 #>>41915889 #
2. stackskipton ◴[] No.41915421[source]
How many people are greenfield new Django style projects? I know Static Server-Side Rendering is becoming new hotness but I still thought pure Server-Side Rendering is frowned upon.

Most of SSR I see is still SPA + Rest API/GraphQL backend with some scraper generating all the HTML.

replies(1): >>41915464 #
3. the__alchemist ◴[] No.41915464[source]
This is orthogonal; You don't use auth, email, automatic admin, migrations etc from a SPA; those are backend jobs.
4. cchance ◴[] No.41915535[source]
So... rust "on rails" is basically ... https://github.com/loco-rs/loco

less rails is... leptos, and a few others

5. culi ◴[] No.41915889[source]
Rocket comes with support for templating, cookies, websockets, middleware, an orm, testing, etc. I'm not familiar with Python web development (or why anyone would reach for Python for a webapp in 2024 :P), but it seems pretty analogous to Rails

It's also the oldest/most mature tool out there

replies(1): >>41917627 #
6. JodieBenitez ◴[] No.41917627[source]
"The goal is for functionality like templating, sessions, ORMs, and so on to be implemented entirely outside of Rocket"

So definitely a Flask, not a Django. And I want no Flask.

> why anyone would reach for Python for a webapp in 2024

Because it works damn fine, is complete and stable, has a gigantic ecosystem covering virtually every needs in the field and also we know the ins and outs of it.

Of course, less resource consumption is always good, particularly RAM, hence why we're interested in initiatives like RWF or why I keep an eye on the Go ecosystem.