Jump to ratings and reviews
Rate this book

Programming WebAssembly with Rust: Unified Development for Web, Mobile, and Embedded Applications

Rate this book
WebAssembly fulfills the long-awaited promise of web technologies: fast code, type-safe at compile time, execution in the browser, on embedded devices, or anywhere else. Rust delivers the power of C in a language that strictly enforces type safety. Combine both languages and you can write for the web like never before! Learn how to integrate with JavaScript, run code on platforms other than the browser, and take a step into IoT. Discover the easy way to build cross-platform applications without sacrificing power, and change the way you write code for the web.

WebAssembly is more than just a revolutionary new technology. It’s reshaping how we build applications for the web and beyond. Where technologies like ActiveX and Flash have failed, you can now write code in whatever language you prefer and compile to WebAssembly for fast, type-safe code that runs in the browser, on mobile devices, embedded devices, and more. Combining WebAssembly’s portable, high-performance modules with Rust’s safety and power is a perfect development combination.

Learn how WebAssembly’s stack machine architecture works, install low-level wasm tools, and discover the dark art of writing raw wast code. Build on that foundation and learn how to compile WebAssembly modules from Rust by implementing the logic for a checkers game. Create wasm modules in Rust to interoperate with JavaScript in many compelling ways. Apply your new skills to the world of non-web hosts, and create everything from an app running on a Raspberry Pi that controls a lighting system, to a fully-functioning online multiplayer game engine where developers upload their own arena-bound WebAssembly combat modules.

Get started with WebAssembly today, and change the way you think about the web.

220 pages, Paperback

Published January 10, 2019

31 people are currently reading
120 people want to read

About the author

Kevin Hoffman

51 books33 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
5 (16%)
4 stars
14 (45%)
3 stars
10 (32%)
2 stars
2 (6%)
1 star
0 (0%)
Displaying 1 - 8 of 8 reviews
12 reviews1 follower
May 11, 2021
Already outdated because of the Yew version and the tool used to build the web project, but it was the only example I couldn't run. All others are backed by the code provided and work without problem.

The book is rich in content and combines different tools and technologies to really appreciate the power of WebAssembly (and Rust).
Profile Image for Jiayi.
3 reviews3 followers
July 25, 2020
Despite the reviews on Amazon stating that the examples were useless, I found it extremely useful to start having some ideas for applying WASM in different contexts. I didn't have issues following the books thanks to my previous knowledge of JavaScript and React during the chapters about interacting with WASM in JS.
About the rest of the chapters, I just knew enough Rust and WASM from the official Rust books and MDN (Mozilla Developer Network), but I didn't have any big issue in understanding the code.
Example projects have also been very interesting, showing not-hello-world projects to showcase WASM in browser, a Rust embedded WASM interpreter, WASM modules outside the browser, WASM in Microcontrollers and even some words about WASM in cloud.
In conclusion, I don't recommend the book as absolute first introduction to WASM in Rust. Maybe try the Rust WASM book first, then this book is a very good next step into understanding the actual potentials of WASM.
Profile Image for Nathaniel Inman.
42 reviews2 followers
May 4, 2022
This book aims to cement the integration of webassembly and rust into an existing rust developers mind. There are great code examples of rust to wasm for react-like frontend website, checkers game, rogue, raspberry pi etc, but aside from scaffolding the code the examples don't dive deep into the Rust and wasm integration or even the rust code itself. It seems neither an introduction to rust and webassembly, or a deep dive into either of the pair. If you pull out the code excerpts the book doesn't stand alone with enough value for the reader. The only reason this book has two stars instead of one is found on page 152 when it describes a use case I hadn't thought of: swapping out algorithms or code at runtime with sandboxed environment guarantees. Another page to check is 201 when it describes verifying cryptographic signatures of wasm binaries using EdDSA.
20 reviews
May 17, 2022
Deeply disappointing. Begins with a promising explanation of WASM and WAT, then goes completely off the rails. Becomes almost apologetic for that first part of the book, which is the only part I actually found useful or interesting. Someone buying a book on Rust and WebAssembly doesn’t need yet another sample project based on wasm-bindgen or other high-level support code, any more than someone buying a book on programming x86 with C would want a book that mostly teaches them how to use Qt or the Win32 API. We’re buying the book because we _want_ the fundamentals.
Profile Image for Richard.
Author 4 books13 followers
March 23, 2019
Helpful! The first couple of chapters have you writing Web Assembly by hand and all the bit fiddling that involves. You then get the joy of how Rust takes care of that for you over a few chapters. That stuff was what I came to the book for. The rest of the book covers using a web framework, and running Web Assembly on a Raspberry Pi.
Profile Image for Mike Zornek.
62 reviews9 followers
July 31, 2021
Dropped this book about half way through. It was successful at introducing me to some general concepts but I was drowning in confusion trying to read the Rust code (for which I am new to). Am jumping to more introductory books to get my head around Rust but still excited for what is possible through WebAssembly.
Profile Image for Sorin Dolha.
3 reviews1 follower
January 8, 2023
Word “Mobile” shouldn’t have been added to the subtitle, unfortunately.
6 reviews
Read
April 5, 2019
It's hard to find a book cover both WebAssembly and Rust, right? I didn't really follow the code examples, but basically skimmed over the book to grasp a basic idea about WebAssembly and its ecosystem.
Displaying 1 - 8 of 8 reviews

Can't find what you're looking for?

Get help and learn more about the design.