Show HN: Rust Web Framework

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rwf

    Comprehensive framework for building web applications in Rust.

    I just noticed that REST framework returns 501 - Not Implemented [0] if the method is not implemented, which I think is really weird. I think that most frameworks return 405 Method Not Allowed in such cases.

    Also, it is typically assumed that 5xx return codes are retryable while 4xx are not. So, I don't think that not implemented method should return 5xx, because it is pointless to retry it.

    [0] https://github.com/levkk/rwf/tree/main/examples/rest#restcon...

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • loco

    🚂 🦀 The one-person framework for Rust for side-projects and startups

    Lately I've been following https://loco.rs/ as it aims for a rails-like experience, complete with generators for workers, controllers, etc. I've only had time to experiment but it's the closest I've gotten to feeling rails-y in rust.

  • diesel

    A safe, extensible ORM and Query Builder for Rust

    I would kinda expect REST framework to be able to generate Swagger (aka OpenAPI) definitions out of the box. That's one of the killer features if FastAPI in my opinion.

    Also, I don't really understand what is the reason for creating your own ORM instead of integrating with, let's say diesel.rs [0] and what is the reason for inventing your own template language instead of just picking own of the most popular existing template engines [1].

    Other than that this project looks really interesting and I will definitely keep an eye on it.

    [0] https://diesel.rs/

    [1] https://crates.io/categories/template-engine

  • leptos

    Build fast web applications with Rust.

  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

    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/

  • poem

    A full-featured and easy-to-use web framework with the Rust programming language.

    https://github.com/poem-web/poem is one Rust framework with swagger definitions out of the box.

  • minijinja

    MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2

    your new language? If you had a template language compatible with Django/jinja2 [1] this problem would not arise.

    4. Whether we like it or not more and more people are using LLMs for coding. This potentially could solve the issue of migrating templates. I expect LLMs to perform really well on the task of "translating" a template from a to a . The problem is that if your template language is brand new LLMs probably didn't have enough examples in their training sets to "learn" its syntax. So basically, you are setting up your users for a boring, tedious and error prone task of rewriting each template manually without a proper support from their IDE/editor. Meh.

    BTW, Django makes it very easy to bring your own template engine [2].

    [0] https://en.wikipedia.org/wiki/Not_invented_here

    [1] https://github.com/mitsuhiko/minijinja

    [2] https://docs.djangoproject.com/en/5.1/howto/custom-template-...

  • sailfish

    Simple, small, and extremely fast template engine for Rust

    In random order:

    1 & 2. It's not really a new language. It's very similar to ERB, so existing tooling, including syntax highlighting, etc., shouldn't be an issue.

    4. LLMs are actually pretty good at "understanding" programming language syntax and replicating it to generate code, so even a new language would work. Besides, there is really nothing new under the sun, so similarities with existing languages would help here.

    3. I migrated once from Jinja to Sailfish [1], it wasn't so bad. All template languages are roughly the same: start code tag, some simple code, end code tag, maybe a loop or an if statement, but the vast majority of it is print a variable. It would be nice to bring your templates over during a migration, but they are typically a small portion of your code compared to business logic, so I don't think it'll be a roadblock, if someone wanted to attempt this at all.

    [1] https://github.com/rust-sailfish/sailfish

  • ryde

    ryde is a single person, single file web framework for rust

    Another related submission from today:

    Ryde: A Rust Web Framework - https://github.com/swlkr/ryde (October 2024, 5 comments)

  • jemalloc

    jemalloc (as opposed to GNU libc and LLVM) sometimes performs better. [1]

    [1] https://jemalloc.net/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • What is the best API generator for Axum?

    2 projects | /r/rust | 9 Apr 2023
  • What library to use for a Websocket Server?

    1 project | /r/rust | 23 Feb 2023
  • Rest API framework in rust

    2 projects | /r/rust | 5 Feb 2023
  • A taste of pavex, an upcoming Rust web framework

    3 projects | /r/rust | 24 Dec 2022
  • Migrating from warp to axum

    2 projects | /r/rust | 23 Nov 2022