Yew - a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly

Yew looks really interesting!!

What is Yew?

Yew is a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly.

  • It features a component-based framework which makes it easy to create interactive UIs. Developers who have experience with frameworks like React and Elm should feel quite at home when using Yew.
  • It achieves great performance by minimizing DOM API calls and by helping developers easily offload processing to the background using web workers.
  • It supports JavaScript interoperability, allowing developers to leverage NPM packages and integrate with existing JavaScript applications.

Still not convinced?

This project is built on cutting edge technology and is great for developers who like to develop the foundational projects of tomorrow. Here are some reasons why we believe that frameworks like Yew are the future of web development.

Wait, why WebAssembly?

WebAssembly (Wasm) is a portable low-level language that Rust can compile into. It runs at native speeds in the browser and is interoperable with JavaScript and supported in all major browsers. For ideas on how to get the most out of WebAssembly for your app, check out this list of use cases.

It should be noted that using Wasm is not (yet) a silver bullet for improving the performance of web apps. As of the present, using DOM APIs from WebAssembly is still slower than calling them directly from JavaScript. This is a temporary issue which the WebAssembly Interface Types proposal aims to resolve. If you would like to learn more, check out this excellent article describing the proposal from Mozilla.

Ok, but why Rust?

Rust is blazing fast and reliable with its rich type system and ownership model. It has a tough learning curve but is well worth the effort. Rust has been voted the most loved programming language in Stack Overflow’s Developer Survey five years in a row: 2016,2017, 2018, 2019 and 2020.

Rust also helps developers write safer code with its rich type system and ownership model. Say goodbye to hard to track down race condition bugs in JavaScript! In fact, with Rust, most of your bugs will be caught by the compiler before your app even runs. And don’t worry, when your app does run into an error, you can still get full stack-traces for your Rust code in the browser console.

Anyone excited by Yew? Anyone used/heard of it?

Setting up our portal for it now… …done:

1 Like

Share link for this tweet.