Wrapping Up
In this chapter, you took the giant leap from manual and cumbersome communication between JavaScript and Rust-based WebAssembly modules to using the wasm_bindgen crate. With this library’s macros and command-line tooling, you have seamless, bi-directional invocations across the WebAssembly/JavaScript boundary.
To see this power in action, you built the Rogue WebAssembly game to help guide and inform your decisions about when code belongs in JavaScript versus when it belongs in Rust. Continuing this path toward more advanced tooling and libraries, in the next chapter, you’ll get to build a fully functional, networked, multi-user application almost entirely in Rust.
Get Programming WebAssembly with Rust 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.