Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 12, 2026·2 min de lecture

Yew — Rust WASM Framework for Web Applications

Yew is a Rust framework for creating reliable and efficient web applications that compile to WebAssembly. Component-based with a virtual DOM, hooks, and familiar React-like API. Write your entire frontend in Rust with type safety and performance.

Introduction

Yew is a Rust framework for building web applications that compile to WebAssembly. Inspired by React and Elm, Yew provides a component model with virtual DOM, hooks, and a familiar developer experience — but in Rust with full type safety and WASM performance.

What Yew Does

  • Components — function and struct components
  • html! macro — JSX-like syntax for Rust
  • Hooks — use_state, use_effect, use_context, use_reducer
  • Virtual DOM — efficient diffing and patching
  • Agent system — web workers for background tasks
  • SSR — server-side rendering support
  • Properties — typed props with derive macro
  • Events — click, input, submit, custom
  • Trunk — build tool for WASM projects

Comparison

Framework Reactivity SSR Maturity
Yew VDOM Yes Most mature
Leptos Signals Yes Growing fast
Dioxus Signals Yes Multi-platform
Sycamore Signals Yes Smaller

FAQ

Q: Is the WASM bundle large? A: About 200-400KB gzipped, depending on dependencies. Bigger than a React bundle but faster at runtime. wasm-opt can shave another 20-30%.

Q: JS interop? A: Call any Web API via wasm-bindgen and web-sys. You can also use the gloo library to simplify DOM/fetch/timer operations.

Sources

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires