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.
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).
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.
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.
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.
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.
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.
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.