Rust + Yew + WebAssembly codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged WebAssembly web application built with Yew including CRUD operations, authentication, routing, pagination, and more. It utilizes Yew's latest function components and hooks. It also supports desktop application powered by Tauri.
We've gone to great lengths to adhere to the Yew community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
You can view a live demo over at Demo
| Home(Web) | Article(Web) |
|---|---|
![]() |
![]() |
| Edit(Desktop) | Sign Up(Desktop) |
|---|---|
![]() |
![]() |
This is an application written in Rust that utilizes Yew and WebAssembly for developing the frontend web app that powers the RealWorld application.
You can view a full list of crates being used in Cargo.toml, but here are some of the main ones of note:
Mutex, RwLock, Condvar and Once etc.docker-compose upYou can visit http://127.0.0.1:8080 in your browser now.
Install Rust
Install wasm-pack
cargo install wasm-packInstall trunk
Build and develop
Copy .env.example to .env, and you can change the environment variables if you like.
cp .env.example .env
cd crates/conduit-wasm && trunk serveYou can visit http://127.0.0.1:8080 in your browser now.
Build and release
cd crates/conduit-wasm && trunk buildYou should find static files at crates/conduit-wasm/dist folder now, they are hosted in gh-pages branch as a demo.
Test
Install chromedriver, run tests in headless browsers.
wasm-pack test --headless --chromeJustfile
just install-wasm-pack.env.example to .env just envjust trunk-servejust trunk-buildjust testInstall Tauri
cargo install tauri-cliBuild and develop for desktop
cargo tauri devBuild and release for desktop
cargo tauri buildJustfile
just install-taurijust tauri-devjust tauri-buildThis project was bootstrapped with Create Yew App, if you want to quickly setup a new Yew web app for your own, you might try Create Yew App, an unofficial tool to set up a modern Yew web app by simply running one command.
npx create-yew-app my-app
cd my-app
trunk serveJustfile:
just create-yew-appjust app-serveFeel free to take a look at the current issues in this repo for anything that currently needs to be worked on.
You are also welcome to open a PR or a new issue if you see something is missing or could be improved upon.
Apache License (Version 2.0)
See LICENSE for details