Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Congrats on the release. I have to admit looking at the code samples, this looks like some pretty tough to swallow ergonomics for real-world usage. Is this inherent to Rust web libraries?


sort by: page size:

What kind of ergonomic benefit would this bring to an average rust developer who doesn't go into the depth of rust traits/type systems and just use libraries made by other smart people to develop some web service backend?

Looking forward to the Rust implementation, compiled to Web Assembly :)

I was with you all the way until the api example.

That doesn’t look ergonomic, it’s verbose AF, and the ugly use of f! is (like most crates that lean heavily into macros) going break tooling like the intellij rust plugin.

Does rust really need another web framework?

Does it need a compiles-to-rust meta language that means you cant easily see the actual rust code you’re using?

Does this feel ergonomic enough to make it worthwhile the downsides of the first two?

Hm.


Any takeaways? Is it a promising direction? Would it be viable to create an “isomorphic rust” web app?

In practice, I don't think Rust is really particularly well suited for this use case (especially the frontend stuff). But this is a really cool demo nonetheless, and the underlying WebAssembly will be something a lot of languages can use someday.

Are you actually using Rust for professional web development? I've tried it earlier this year and my experience wasn't that great, so I'm quite surprised to read this comment.

Thanks! I personally love Rust, though the only reason we haven't done the libraries yet is that I feel not that many people use Rust in production web services just yet. I may be wrong though...

Thanks for this summary. It’s one thing that’s kept me away from rust and also webassembly in a similar way.

Can anyone tell how hard/easy the development experience with Rust is for projects like this and how comparable it is with other languages with well established UI frameworks?

This is refreshing to hear. As a UI developer. More curious about Rust now. Thanks.

This looks great! Been looking to pivot from web / JS into systems programming and Rust seems extra appealing.

Yep, I don't think Rust is quite there yet for web dev. I didn't use Rust for any frontend interactions. The web app is an SPA written in Svelte. I only used it for the core state update logic, which benefits from the typing and performance boost.

Web frontend in Rust?

Horror!


Wow! Another piece of software written in Rust with hobby-level of usability.

I have really tried using Rust for the web (because I truly enjoy Rust). The ergonomics just aren't there yet.

Leptos, as a popular recent example, suffers from one major issue (that most others suffer from too): the JSX stuff is opaque to Rust Analyzer. Code completion aside, you lose the ability to hover - massively crippling any hope of tracking down how to resolve a type mismatch.

Web Rust also has the impedance mismatch that Rust has for UI. There are several success stories - e.g. Cosmic Desktop, but I'm certain that there's more love than practicality involved.

I think part of the reason is that we are trying to shove in existing patterns - which originate from OOP languages - into Rust. In both semantic and ergonomic terms I have been bitten by trying to OOP in Rust when I was first learning it.

I think that there exists an (as yet unknown) solution to the UI problem. It's just going to look nothing like React (or Elm even).


Rust is very much not aimed at web applications. You could say that it's aimed at _implementing web browsers_, and has become a general purpose language anyway.

Good. One more reason to look at rust. Main motivation is webassembly for me

Yeah to me Rust almost feels like the prototype for the next great programming language. There are a lot of great ideas there, but there are also a lot of awkward edges. Like what it accomplishes from a technical perspective is super impressive, but it would be great if somebody could synthesize all of those concepts behind a cleaner front-end which really nails the ergonomics.

Reading the super majority of Rust code is equally easy or easier than reading Python, or Typescript, or even Ruby.

Writing Rust applications is also very ergonomic. The Rust web server frameworks are approaching the ergonomics of Typescript web server frameworks.

The only Rudy lacking ergonomics is writing net new frameworks or missing framework pieces, or when std is not available.

95%+ of all new Rust code will fall into the bucket of “ergonomic to write and read”.

next

Legal | privacy