-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from Svelte to Leptos #309
Comments
I am absolutely interested about leptos and already thinking about it anyway since quite some time, how we could do a migration smoothly. I am using leptos almost exclusively for all my other (newer) projects already. When Rauthy has been started, there simply was no leptos. The only real Rust framework was Yew. But unfortunately, this has huge payloads and wasm sizes, which is why I never really considered it. We will for sure not get rid of That was a bit off-topic. :) I really like leptos, I am using it at lot in other projects and a migration would make the whole UI development thing a lot easier. The only considerations, before we can actually do this, are:
In its current setup, a To make things short: |
@kerkmann regarding the |
@sebadob Thanks! I am a little bit busy, but I'll take a look within the next few weeks, thanks for all your support. ❤️ |
I did a few tests and played around with As much as I like leptos and use it on different projects as well, I think you should always use the right tool for the job.
When we assume that we have a small instance with a few hundred users, then we would probably have a handful of admins. But this means that a few hundred users need to download ~9x the payload they actually need and use, because they will never even need the admin UI parts. This is not only a pretty huge waste of bandwith with many users, but it also slows down each single one dramatically.
Rauthy is kind of the worst case scenario, when you can't split your frontend payloads. Only a fraction of all the users ever needs all the admin parts and all ways to solve this issue would be a way more complicated setup to run and build then it is now. If the way browsers handle WASMs changes in the future and we will be able to split them easily (we can't right now because a WASM is loaded in a streaming way), then we can consider this again and open a new issue about it, but right now it does not make any sense and it would be weeks of work. |
There is hope! rustwasm/wasm-bindgen#3939 (comment) |
@erlend-sh Yes I saw it as well that greg forked the testing repo for that and I am really hyped about it. This is still in very early babyb steps, but if we can get this stable in the next months, this would be one of the most awesome things for WASM. This is one of the 2 biggest pain points with wasm. Also the wasm size will shrink quite a bit with leptos v0.7 + islands. Maybe in the future it would make sense to migrate Rauthy's UI as well, but this would be a lot of work. |
Would be awesome if this project would use leptos, this would help to get rid of the entire
just
/npm
stuff. ❤️Also one idea about leptos is, the frontend could be behind a feature flag and vice versa, headless feature would be awesome. :)
Feel free to close this issue, if you are not interested in
leptos
, or reach out if you need help! ❤️The text was updated successfully, but these errors were encountered: