DEV Community

Cover image for Valerie: Rethinking Web Apps in Rust

Valerie: Rethinking Web Apps in Rust

Emmanuel Antony on July 10, 2020

I have personally tried and seen various front-end frameworks for Web Apps in Rust. To be honest, they are pretty good and do their job well. But t...
Collapse
 
wulymammoth profile image
David • Edited

This was a fun read because you've basically captured some of the ideas that's been swirling around in my head for a while and I've been interested in Rust for a long while, but still have not had time to sink into learning it as I waste time reading Rust articles and watching Rust videos on YouTube... lol

I'm going to toss a couple things onto the heap that may serve as inspirations that may or may not align with your current goals with Valerie:
1) have you checked out Phoenix the web framework in the Elixir community? The default mode in Elixir is message passing being that it runs on the Erlang VM and an actor-based model of concurrency. I used to write a lot of JS, but this gives me an alternative not to and, frankly, I thought LiveView was going to be a gimmick, but this was pretty spectacular: youtube.com/watch?v=MZvmYaFkNJI. The core team built a dashboard providing real-time observability and introspection: news.ycombinator.com/item?id=22892401
2) you may already be familiar with SvelteJS, but def check it out if you aren't, because it was the library that made it apparent to me that a virtual-DOM is NOT needed and it is additional overhead which I think aligns with what you're trying to accomplish

Collapse
 
emmanuelantony2000 profile image
Emmanuel Antony

Thanks. 😁
I'll do check out Phoenix. Yes I have checked out Svelte. And I have also derived some ideas for the syntax from Jetpack Compose and SwiftUI.

Collapse
 
intermundos profile image
intermundos

13kb for a div with button is pretty solid, but the direction is nice. Keep it up!

Collapse
 
autra profile image
Augustin Trancart

State update should be asynchronous. Period.

Care to elaborate? What do you mean exactly by "state updates"? On every major reactive front framework (Vue+React at least), the mutation part of a state update is completely synchronous (though all other stuff : action emissions, rendering etc.... are not).

Collapse
 
alilee profile image
Alister Lee

Have you seen github.com/schell/mogwai ?

Collapse
 
emmanuelantony2000 profile image
Emmanuel Antony

Oh yes, I have. Now, Valerie is focussed at simplicity and performance. We don't have benchmarks yet. The project is still very young. The idea is for people to write high performance wasm web apps, small in size, even if they aren't that fluent with Rust without having to maintain a complex UI code.

Collapse
 
s_p profile image
Shreevari SP

Very intuitive!

Collapse
 
itsjzt profile image
Saurabh Sharma • Edited

I see this as a step in bring you own language on web.

Finally you're not limited to the language of web, you can use anything.

Collapse
 
arcticspacefox profile image
ArcticSpaceFox

Pretty cool, keep goin

Collapse
 
drdougtheman profile image
drdougtheman

Is this SSR? How do I setup a server to handle it?

Collapse
 
emmanuelantony2000 profile image
Emmanuel Antony

No this is Client side rendered, SSR support will be added soon, do keep an eye out. 😁

Collapse
 
msfjarvis profile image
Harsh Shandilya

This looks extremely promising 🙌
I'll be keeping an eye out.

Collapse
 
kelleyvanevert profile image
Kelley van Evert

Fun! I hope to see more of it :)