<p><span>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 f
Programming WebAssembly with Rust: Unified Development for Web, Mobile, and Embedded Applications
β Scribed by Kevin Hoffman
- Publisher
- Pragmatic Bookshelf
- Year
- 2019
- Tongue
- English
- Leaves
- 231
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
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.
What You Need:
You'll need a Linux, Mac, or Windows workstation with an Internet connection. You'll need an up-to-date web browser that supports WebAssembly. To work with the sample code, you can use your favorite text editor or IDE. The book will guide you through installing the Rust and WebAssembly tools needed for each chapter.
β¦ Table of Contents
Cover......Page 1
Table of Contents......Page 9
Acknowledgments......Page 12
Introduction......Page 13
The Tech of Tomorrow......Page 14
Who This Book Is For......Page 15
What You'll Learn......Page 16
Part IβBuilding a Foundation......Page 18
Introducing WebAssembly......Page 19
Understanding WebAssembly Architecture......Page 24
Building a WebAssembly Application......Page 28
Wrapping Up......Page 33
Playing Checkers, the Board Game......Page 34
Coping with Data Structure Constraints......Page 35
Implementing Game Rules......Page 49
Moving Players......Page 50
Testing Wasm Checkers......Page 53
Wrapping Up......Page 56
Part IIβInteracting with JavaScript......Page 58
Introducing Rust......Page 59
Building Hello WebAssembly in Rust......Page 61
Creating Rusty Checkers......Page 64
Coding the Rusty Checkers WebAssembly Interface......Page 74
Playing Rusty Checkers in JavaScript......Page 78
Wrapping Up......Page 79
Creating a Better βHello, Worldβ......Page 80
Building the Rogue WebAssembly Game......Page 86
Experimenting Further......Page 100
Wrapping Up......Page 101
Getting Started with Yew......Page 102
Building a Live Chat Application......Page 112
Wrapping Up......Page 125
Part IIIβWorking with Non-Web Hosts......Page 126
How to Be a Good Host......Page 127
Interpreting WebAssembly Modules with Rust......Page 129
Building a Console Host Checkers Player......Page 132
Wrapping Up......Page 141
7. Exploring the Internet of WebAssembly Things......Page 143
Overview of the Generic Indicator Module......Page 144
Creating Indicator Modules......Page 147
Building Rust Applications for ARM Devices......Page 152
Hosting Indicator Modules on a Raspberry Pi......Page 153
Hardware Shopping List......Page 162
Endless Possibilities......Page 164
Wrapping Up......Page 166
8. Building WARoS---The WebAssembly Robot System......Page 167
An Homage to Crobots......Page 168
Designing the WARoS API......Page 169
Building the WARoS Match Engine......Page 174
Creating WebAssembly Robots......Page 198
Wrapping Up......Page 203
Conclusion......Page 204
Serverless 101......Page 205
WebAssembly in the Cloud......Page 206
Serverless WebAssembly in the Wild......Page 207
Integration with OpenFaaS......Page 209
Browser-Based Attack Vectors......Page 210
Signing and Encrypting WebAssembly Modules......Page 211
β B β......Page 216
β C β......Page 217
β F β......Page 218
β I β......Page 219
β M β......Page 220
β P β......Page 221
β R β......Page 222
β T β......Page 223
β W β......Page 224
β Z β......Page 225
β¦ Subjects
Nonfiction
π SIMILAR VOLUMES
Unified Development for Web, Mobile, and Embedded Applications
<span><div><p>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 wr
<p><b>Build rich and collaborative applications using client-side code with React, Redux, and Firebase</b></p><h4>Key Features</h4><ul><li>A practical guide covering the full stack for web development with React 16 and Firebase</li><li>Leverage the power of Firebase Cloud Storage, messaging, functio
This book is your guide to mastering Rust programming, equipping you with essential skills and insights for efficient system programming. It starts by introducing Rust's significance in the system programming domain and highlighting its advantages over traditional languages like C/C++. You'll then e
<DIV><p>When developing apps for the latest smartphones, youβre faced with several vexing questions. How many platforms do you need to accommodate? What level of support do mobile browsers provide? To help you address these and many other key issues, this guide provides a hands-on tour of the most p