Introduction

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 has great performance by minimizing DOM API calls and by helping developers easily offload processing to background web workers.
  • It supports JavaScript interoperability, allowing developers to leverage NPM packages and integrate with existing JavaScript applications.

Join Us 😊

Our community is thriving!

Ready to dive in?

Click the link below to learn how to build your first Yew app and learn from community example projects

{% page-ref page="getting-started/project-setup/" %}

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 a web app. As of right now, 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 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 four years in a row: 2016, 2017, 2018 and 2019.

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.

Alternatives?

We love to share ideas with other projects and believe we can all help each other reach the full potential of this exciting new technology. If you're not into Yew, you may like the following projects (listed alphabetically)

  • Draco - "A Rust library for building client side web applications with Web Assembly"
  • Percy - "A modular toolkit for building isomorphic web apps with Rust + WebAssembly"
  • Seed - "A Rust framework for creating web apps"
  • Smithy - "A framework for building WebAssembly apps in Rust"