Port of elm architecture in rust

Anyone here who loves elm and also want try rust. I ported The Elm Architecture to rust and I think I made a pretty good job with it. I would be very interested in a feedback from an elm programmer perspective.
The project is called sauron

The goal of sauron is for developers for both front-end and back-end code to write as little code as possible.
Evident in the examples provided, like elm it is designed to be as clean and concise as possible which lets you focus on your application code,
rather than having to worry about contexts, states, props, and many other things that other frameworks
require you to have a knowledge of.


It seems an interesting project! Since I’m not familiar with Rust, maybe other persons in the community could provide technical analysis of the project.

What do you think @rtfeldman?

1 Like

WOW, impressive !! … now I have a mission for this weekend to play with sauron, Rust and Wasm … thank you very much for sharing !! :pray: :heart: :heart:


Thank you!

I also added a few tutorial to follow, the Getting started and the counter example

Feel free to make a discussion in the repo.


Great, thanks to you, great work !!

1 Like

My first reaction to this announcement is “cool!”. My second reaction is that it’s hard to separate elm from the compiler and devex, given the emphasis on friendly compiler error messages and paring down of available abstractions.

Rust compiler also has a good compiler error messages, personally elm compiler error messages is way better and very detailed.

1 Like

I don’t like isomorphic applications, but if I were forced to work on one, I would much rather it be rust-elm + rocket than react + express.

Looks neat!

Can you point me to an example of some backend code in this architecture?

Are there any similarities with Lamdera – where data/state management on backend is very similar to the frontend?

Here is a clone of hackernews as an example GitHub - ivanceras/hackernews-sauron: A fast, resilient, isomorphic hacker news clone in ~1k lines of rust. .

The backend part is using a axum which is a multi-threaded server which can serve the static files and render the initial html server-side , which then hydrate the app in the client and becomes full interactive front-end.

This way, the user see something while the page is being loaded, as opposed to most SPA where the users have to wait until the browser finish executing the client-side render code.

You can compile the hackernews clone and get a single portable ~5mb binary, which contains the server and static files to serve the application. You can put it into a freshly installed linux machine or docker and it will just serve the application as is.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.