19 releases (breaking)
0.21.0 | Sep 29, 2023 |
---|---|
0.20.0 | Nov 25, 2022 |
0.19.3 | Dec 11, 2021 |
0.18.0 | May 15, 2021 |
0.7.0 | Jul 19, 2019 |
#1317 in WebAssembly
33,071 downloads per month
Used in 260 crates
(3 directly)
185KB
4.5K
SLoC
Yew
Rust / Wasm client web app framework
Documentation (stable) | Documentation (latest) | Examples | Changelog | Roadmap | 简体中文文档 | 繁體中文文檔 | ドキュメント
About
Yew is a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly.
- Features a macro for declaring interactive HTML with Rust expressions. Developers who have experience using JSX in React should feel quite at home when using Yew.
- Achieves high performance by minimizing DOM API calls for each page render and by making it easy to offload processing to background web workers.
- Supports JavaScript interoperability, allowing developers to leverage NPM packages and integrate with existing JavaScript applications.
Note: Yew is not 1.0 yet. Be prepared to do major refactoring due to breaking API changes.
Contributing
Yew is a community effort and we welcome all kinds of contributions, big or small, from developers of all backgrounds. We want the Yew community to be a fun and friendly place, so please review our Code of Conduct to learn what behavior will not be tolerated.
🤠 New to Yew?
Start learning about the framework by helping us improve our documentation. Pull requests which improve test coverage are also very welcome.
😎 Looking for inspiration?
Check out the community curated list of awesome things related to Yew / WebAssembly at jetli/awesome-yew.
🤔 Confused about something?
Feel free to drop into our Discord chatroom or open a new "Question" issue to get help from contributors. Often questions lead to improvements to the ergonomics of the framework, better documentation, and even new features!
🙂 Ready to dive into the code?
After reviewing the Contribution Guide, check out the "Good First Issues" (they are eager for attention!). Once you find one that interests you, feel free to assign yourself to an issue and don't hesitate to reach out for guidance, the issues vary in complexity.
😱 Found a bug?
Please report all bugs! We are happy to help support developers fix the bugs they find if they are interested and have the time.
🤓 Want to help translate?
Translations can be submitted on the Yew GitLocalize Repo. If you are interested in being the official moderator for a language, please reach out on Discord.
Contributors
Code Contributors
This project exists thanks to all the people who contribute.
Financial Contributors
Become a financial contributor and help us sustain our community. [Contribute]
Individuals
Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
lib.rs
:
This crate provides Yew's procedural macro html!
which allows using JSX-like syntax
for generating html and the Properties
derive macro for deriving the Properties
trait
for components.
use yew::prelude::*;
struct Component;
#[derive(Properties, PartialEq)]
struct Props {
prop: String,
}
#
#
#
#
// ...
html! {
<div>
<button onclick={ctx.link().callback(|_| Msg::Submit)}>
{ "Submit" }
</button>
<>
<Component prop="first" />
<Component prop="second" />
</>
</div>
}
#
#
Please refer to https://github.com/yewstack/yew for how to set this up.
Dependencies
~0.6–1MB
~24K SLoC