What does HackerNews think of yew?
Rust / Wasm framework for building client web apps
If I'm going to be bound by the limitations of how immature WebAssembly is right now, I'd at least use its more mature ecosystem for development, which is Rust. And actually, I recently began doing so in my free time with a framework named Yew[1].
I know that it's unrealistic to expect Python to be a first-class citizen in browsers as JS is, but at some point we'll grow tired of reading "X language is now available for browsers" when it's more like "X can do WASM now".
edit: Anyway, I don't want to come off as under-appreciative of PyScript. I'm sure a lot of people will love it and make it grow a lot. I'd probably give it a try someday too. Props to the developers!
There aren't many languages that are practical for WASM output. Scripting and managed languages need to ship their interpreters and runtimes with their WASM blobs, and can end up relatively large. JavaScript's interpreter and runtime are baked into every browser already.
That leaves only compiled and unmanaged languages for potentially good WASM targets. As mentioned before, Rust is seeing a lot development in that space. If LLVM can compile it, then Emscripten can output it to WASM.
ReScript + rescript-react is a good alternative. Less safe, waaaay more verbose; but backed by Facebook.
This is quite cute (in TypeScript though): https://github.com/cyclejs/cyclejs
And Yew is super cool, it goes the WASM route (in Rust): https://github.com/yewstack/yew
Yew [1] is one of the early Rust frameworks for client side work. It allows for multi-threaded (!) execution and javascript interop.
Not many other languages make sense as you have to pack in the whole runtime, GC, etc. Rust is pretty well positioned for WASM, and it's going to take off soon.
https://github.com/stoically/syn-rsx
https://github.com/yewstack/yew
But there are others like Sauron, Maple, and Percy that have their own Elm-like approach which is probably almost just as good.
There is yew (https://github.com/yewstack/yew) which is a React inspired Rust framework that compiles to WASM.
[1]: https://medium.com/wasm/webassembly-on-the-server-side-c584f... [2]: https://news.ycombinator.com/item?id=16835769 [3]: https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor [4]: https://github.com/yewstack/yew [5]: https://github.com/hexops/vecty [6]: https://www.assemblyscript.org/
I admit I feel I share some of your frustrations. In the past I have written production frontends in Angular and experimented with Vue and React. Out of all of them I found React to be the most enjoyable, but even then I still struggled with project setup and found the tooling confusing. I even quite like TS as a language, but I feel it's still quite limited by the fact it transpiles to JS.
Recently, I discovered yew [0]. It is a Rust framework for building frontends using wasm. I really appreciate the robustness that Rust brings such as ownership checks and ADTs. I don't think it's for everyone, but it may be worth looking at if you perhaps find modern frontend development confusing frustrating. I've found it to be quite the breath of fresh air.
If you do decide to have a look I found the examples [1] and getting started guide [2] very informative.
[0] https://github.com/yewstack/yew
Yew look like they’re trying to be that alternative.
Rust web framework generating webassembly apps.
Possible stack could be
yew -> grpc -> rust backend.
I agree that it won't reach the popularity levels of JS due to the learning curve, but on technical side of things future is _now_.
We've been moving to Rust in our backend, being able to share some of these lessons (and code) with our front end would be really neat, in addition to being able to take advantage of the new features coming down the pipe for WASM (multithreading!)