© Shing Lyu 2021
S. LyuPractical Rust Web Projectshttps://doi.org/10.1007/978-1-4842-6589-5_6

6. High-Performance Web Frontend Using WebAssembly

Shing Lyu1  
(1)
Amsterdam, The Netherlands
 

We’ve seen how Rust can help us in the backend in many different ways: static web servers, REST APIs, serverless computing, and WebSocket. But can you use Rust in the frontend? The answer is yes! With the introduction of WebAssembly1 (abbreviated Wasm), you can compile a Rust program to WebAssembly and run it in browsers, alongside JavaScript.

What Is WebAssembly?

WebAssembly is an open standard for a binary instruction format that runs on a stack-based virtual machine. Its original design goal was to provide near-native performance in web browsers. You can think ...

Get Practical Rust Web Projects: Building Cloud and Web-Based Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.