Introduction to Rust + WebAssembly

Peter Johanson (https://petejohanson.dev/)

Slides: https://petejohanson.gitlab.io/nerds20-rust-webassembly/

Real World Example:
- https://petejohanson.gitlab.io/hyperworm
- https://gitlab.com/petejohanson/hyperworm

Rust is a fast, memory efficient programming language that benefits from a rich type system and a powerful ownership model. This elegant blend of features has allowed Rust to thrive for a variety of use cases, from powering Mozilla's Quantum browser efforts to targeting another recent technology, WebAssembly.

WebAssembly is a language-agnostic binary instruction format that powers a stack-based virtual machine. It is intended to be a cross-platform target for higher level languages such as C/C++ and Rust, allowing developers to write fast/efficient code in powerful languages that can target the web, and more recently non-browser runtimes.

Attendees of this talk will be introduced to the Rust programming language, learn how to install it via Rustup, and then follow along as we bootstrap a simple Rust + WebAssembly project that demonstrates how to integrate Rust with the web platform. After bootstrapping the project, we'll add a basic "Hello World" to help highlight the tooling involved and how Rust can interface with the DOM and other JavaScript APIs.

Given time, we will also review more recent efforts on standardizing the WebAssembly System Interface (WASI) that enables running WebAssembly outside of a browser context, with APIs for file/filesystem access, Berkley sockets, random number generation, etc.

Drupal is a registered trademark of Dries Buytaert.