
Explore front-end web development with Rust and WebAssembly, learn how Rust tooling and frameworks like Yew and trunk enable building reliable, interactive web apps.
Set up a rust frontend with webassembly by adding the wasm32 target via rustup, install trunk, and initialize crates-fe alongside crates-backend for a json rest api.
Add yew as a dependency (0.20) and enable client-side rendering for an admin app. Create a root function component and render it with trunk using wasm.
Start the backend server using docker compose and ensure postgresql connectivity via migrations. Create an admin user and expose the rocket backend at port 8000 for login requests from the frontend.
Build a reusable sidebar navigation using bootstrap and yew router, with three links (home, rustaceans, crates), and implement active link highlighting via current route to improve usability.
Create a reusable text area component for the description field in a Rust frontend app, reusing the input pattern and wiring description state and change handling in the crate form.
WebAssembly is a binary instruction format that most browsers support. It enables languages such as Rust, C, C++ Go, etc., to be compiled and run in a web browser.
The Rust programming language is the most frequently used language for developing WebAssembly applications, according to surveys.
And how could it not? It was voted as StackOverflow’s most loved and desired programming language, eight years in a row, thus everyone is looking for an excuse to run it even inside browsers, where Javascript is the usually the common approach.
You have already spent a good amount of time developing web applications and you have a very good understanding of Rust.
You are wondering whether you can develop your next UI in Rust and ship it to browser via WASM.
You are looking for a resource that has all you need in a single place.
Well, look no further! In this course i will show you how to create a complex web app in Rust that consumes JSON APIs.
We will use the Yew web framework along with wasm crates to build a UI with
- Authentication
- Several different routes and pages
- Forms for CRUD support
- State management, custom hooks and reducers
- Async requests via browser's fetch API