-
Book Overview & Buying
-
Table Of Contents
The Rust Programming Handbook
By :
So far, our Axum application is a powerful backend API, complete with a persistent sqlx database connection. But the “full-stack” promise of Rust also extends to the client side.
This is possible through WebAssembly (Wasm), a high-performance binary format that runs in modern web browsers, allowing you to execute Rust code directly on the client for computationally intensive tasks or, as we’ll do here, to build a simple, interactive frontend.
Getting a full grasp of WASM could fill a book on its own! But basically, it’s a way to run non-JavaScript code in your browser very efficiently, almost at native speed.
This section provides a brief overview of this workflow to demonstrate how you can connect a Rust-powered frontend to the Rust backend we have just built.
To get started, we need to create a new, separate library crate for our Wasm code. This project will be compiled...