Discussion
Loading...

Discussion

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
a mouse refusing to grow up
a mouse refusing to grow up
@algernon@come-from.mad-scientist.club  ·  activity timestamp 3 hours ago

Say, I want to write a full stack web application in Rust, preferably with zero JavaScript (WASM is okay, though).

What is everyone's favourite? I've used Yew before and it was nice. I've heard about Leptos, but apart from spending a total of 5 minutes glancing at its docs and examples, I know nothing about it.

Are there others? What's people's favourite?

#rust #webapp

  • Copy link
  • Flag this post
  • Block
solo
solo
@solonovamax@tech.lgbt replied  ·  activity timestamp 2 hours ago

@algernon afaik you need js to even load wasm
and if you want to do dom manipulation, you need to go through js (see: wasm-bindgen)

in the past I've also been suggested https://egui.rs (for a project I never went through with, so I have no experience with it)
however it's important to note that egui.rs completely forgoes all html and instead everything is rendered in a <canvas>, so in terms of accessibility there is absolutely none.

  • Copy link
  • Flag this comment
  • Block
solo
solo
@solonovamax@tech.lgbt replied  ·  activity timestamp 2 hours ago

@algernon tbh, I do also have a rather intense dislike for js as well, however usually I'll just grit my teeth and write typescript.
if this is a smaller app then I'd recommend doing the same, but if this is a much larger application then it may be worthwhile going the rust route.

another option that exists however if you don't want to use js but can't find anything with rust is kotlin/js (kotlin which gets compiled/transpiled to js code). I do not particularly like kotlin/js (even though I like kotlin (however it has been quite some time since I last tried it)), but it's an option that I thought I'd mention

  • Copy link
  • Flag this comment
  • Block
federico :debian:
federico :debian:
@federico3@oldbytes.space replied  ·  activity timestamp 3 hours ago

@algernon axum and htmx if you can accept running the htmx js part.

  • Copy link
  • Flag this comment
  • Block
Ariel (🐿 arc)
Ariel (🐿 arc)
@arichtman@eigenmagic.net replied  ·  activity timestamp 3 hours ago

@algernon I'm sure someone will mention Dioxus shortly but this one was more niche and had an interesting name so enjoy https://rust-on-nails.com/

  • Copy link
  • Flag this comment
  • Block
a mouse refusing to grow up
a mouse refusing to grow up
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 3 hours ago

For added bonus, it would be lovely if I could write my CSS in Rust too.

  • Copy link
  • Flag this comment
  • Block
a mouse refusing to grow up
a mouse refusing to grow up
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 3 hours ago

Some of the suggetions & my own findings so far:

  • Yew is what I know, it was nice.
  • Leptos I heard about, didn't look into it much.
  • Rust-on-Nails sounded funny, but AGENTS.md means it's not an option.
  • Dixous looks nice, batteries included and all. But it has TailwindCSS integration by default (I do not want anything to do with Tailwind), if the widgets it includes by default depend on Tailwind, then it doesn't really have anything over Leptos or Yew as far as I'm concerned.

I have no desire to touch JS, so using something like htmx is not an option. I want to write everything in Rust. I don't care if that's not the most performant, or most ergonomic thing. I do not want to touch JS for this project. A tiiiiny amount of gluecode, maybe, but...I was able to do completely JS-free with Yew, a couple of years ago. I should be able to do the same now, too.

  • Copy link
  • Flag this comment
  • Block
technomancy
technomancy
@technomancy@hey.hagelb.org replied  ·  activity timestamp 1 hour ago

@algernon huh, I thought "I don't want to touch JS at all" was the main selling point of htmx (haven't used it myself yet)

  • Copy link
  • Flag this comment
  • Block
a mouse refusing to grow up
a mouse refusing to grow up
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 2 hours ago

Since htmx was mentioned a few times...

Screenshot of a warning banner over htmx's GitHub repository, warning me that a user I banned (Claude) has contributed to the repository.
Screenshot of a warning banner over htmx's GitHub repository, warning me that a user I banned (Claude) has contributed to the repository.
Screenshot of a warning banner over htmx's GitHub repository, warning me that a user I banned (Claude) has contributed to the repository.
  • Copy link
  • Flag this comment
  • Block
a mouse refusing to grow up
a mouse refusing to grow up
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 2 hours ago

Mind you, I can't figure out how or when claude contributed. But I did find a few PRs reviewed by CoPilot. That's enough of an indicator that I want nothing to do with htmx if I can help it.

  • Copy link
  • Flag this comment
  • Block
a mouse refusing to grow up
a mouse refusing to grow up
@algernon@come-from.mad-scientist.club replied  ·  activity timestamp 2 hours ago

Now, I will use crates and tools and whatnot that I'd prefer not to, if I have no other option.

Like, serde doesn't have an alternative. Yes, there's facet, with GenAI taint. Hurray.

But if I do have a choice, I will never chose the GenAI infested option.

  • Copy link
  • Flag this comment
  • Block
byte :neobot_sign_beep: :blobhaj_flag_nonbinary:
byte :neobot_sign_beep: :blobhaj_flag_nonbinary:
@byte@awawa.club replied  ·  activity timestamp 2 hours ago
@algernon if wasm is okay then you could write frontend as a usual desktop app and use some UI crate, like bevy ui, or egui, or anything else and just have it running in the browser and sending requests to backend
  • Copy link
  • Flag this comment
  • Block
🌸 lily 🏳️‍⚧️ :flag_pansexual: :flag_ace: θΔ ⋐ &amp; ∞
🌸 lily 🏳️‍⚧️ :flag_pansexual: :flag_ace: θΔ ⋐ &amp; ∞
@tauon@possum.city replied  ·  activity timestamp 2 hours ago

@algernon@come-from.mad-scientist.club
>AGENTS.md means it's not an option.

this is how i feel about facet, it's a lot better than serde but was sludge coded by claude code so i can't use it

i wish serde was too so i was picking the lesser of two evils but oh well

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.40 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct