Rust for the Web

People who use rust for the web, what libraries do you use and which ones do you prefer?

I was shocked at how good Axum is so think i'll stick to it as a backend framework but i'm open to trying out an alternative if you've tried both and think that the alternative is any better. Also, for frontends, did anyone here use Leptos or Dioxus? How do they compare with something like React? For persistence i know that most are fans of Sqlx but i heard it affects performance negatively so i use rust-postgres (an adapter with a deadpool over tokio-postgres). I also tried embedding RocksDB with a Rust crate and worked like a charm.

Any feedback from people who would like to share their experience with rust for the web is welcomed.

Beware Cat Shirt $21.68

Rise, Grind, Banana Find Shirt $21.68

Beware Cat Shirt $21.68

  1. 3 weeks ago
    Anonymous

    Frontend web dev frameworks are not worth it imo. You will spend ages working around quirks and limitations, and do constant rewrites because there's new flavors of the month while the previous one goes unmaintained.

    • 3 weeks ago
      Anonymous

      I'm talking about both web backends and frontends. Just experimenting to see how good the ecosystem is for now.

      • 3 weeks ago
        Anonymous

        Yes, your backend options seem solid. Just chiming in on frontend and hoping for discussion.

        >Frontend web dev frameworks are not worth it imo
        What do you use instead? If you use neither a JS frontend framework nor a Rust one, do you use a server side templating engine with htmx?

        Vanilla js for simple things, something like preact or svelte for advanced stuff.
        I've tried the bigger options like SvelteKit, but smaller easy to understand pieces that can be swapped out easily seems to be easier to maintain so far. I keep breaking simple things on the big JS frameworks. (e.g. compiling on sveltekit, http codes not working on astro, etc)

        If you do use a templating engine, do you use Askama or Maud?

        Askama, still need to evaluate others like maud better. There's differences like hot reloading, compile vs runtime, etc.

        Leptos looks tempting btw, just not sure I'm willing to use it yet for something I need to maintain in the long run.

        • 3 weeks ago
          Anonymous

          The reason why i'm considering Leptos because my favorite frontend js library is SolidJS and from what i heard, it's heavily inspired by Solid and its reactivity model.

    • 3 weeks ago
      Anonymous

      >Frontend web dev frameworks are not worth it imo
      What do you use instead? If you use neither a JS frontend framework nor a Rust one, do you use a server side templating engine with htmx?

      • 3 weeks ago
        Anonymous

        nta, but I've tried htmx with askama as a templating engine, and it has been pretty nice to work with because of the compile time checking of the templates

        • 3 weeks ago
          Anonymous

          I will try it to. I'd like to test leptos, askama+htmx and compare them with what I use right now (solidjs) to get an idea of what I should go with.

    • 3 weeks ago
      Anonymous

      If you do use a templating engine, do you use Askama or Maud?

  2. 3 weeks ago
    Anonymous

    https://blessed.rs/crates

    • 3 weeks ago
      Anonymous

      >deprecated list of deprecated crates

      • 3 weeks ago
        Anonymous

        Got better resources?

    • 3 weeks ago
      Anonymous

      Thanks!

  3. 3 weeks ago
    Anonymous

    i'll never understand why the frick people write sql in caps

    • 3 weeks ago
      Anonymous

      differentiating between symbols and table names

      • 3 weeks ago
        Anonymous

        >what is syntax highlighting

      • 3 weeks ago
        Anonymous

        yes i get that but why
        who the frick would confuse the two
        plus, op wrote 'where' and 'values' lowercase

    • 3 weeks ago
      Anonymous

      i write that way because i was taught that way. lowercase just looks weird.

  4. 3 weeks ago
    Anonymous

    You should try diesel if you want to do databases, project I'm working on at work uses rusqlite but I wish we used an orm so I didn't have to Black person rig migrations manually on top of rusqlite. Other than that, dioxus is nice but I found it somewhat lacking when I needed to make something actually look nice, I found it much simpler to do it with tauri since I could just write React with Rust and it would just work.
    Overall Rust for frontend is pretty good, but I wish there were component libraries like material 3 for dioxus or something, hopefully there will be in the future as the ecosystem matures more

  5. 3 weeks ago
    Anonymous

    I've used actix-web and its crates for all my web servers and haven't found a reasons to look elsewhere.

Your email address will not be published. Required fields are marked *