google / comprehensive-rust

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
https://google.github.io/comprehensive-rust/
Apache License 2.0
27.88k stars 1.67k forks source link

WebAssembly class #1012

Open sakex opened 1 year ago

sakex commented 1 year ago

Objective

Add a chapter to cover WebAssembly in Comprehensive Rust 🦀.

Design Goals

WASM can be thought of both as a compilation target and a platform. Therefore, we want to add a simple entry into “Interoperability > With the web” and a more exhaustive “WebAssembly” class. WASM’s main appeal is the development of applications for the web, so we’ll want to have a setup with a web page that can load the student’s WASM code. Exercises should be visual.

Requirements

Create a new class with the following chapters:

mgeisler commented 1 year ago

Great, let's flesh out the details a bit in the description and make sure to link it from #32.

sakex commented 1 year ago

Exercise Ideas

Game of life

We provide the rendering logic in Javascript, the student has to implement the game logic in Rust.

Real time image processing

From javascript, get the live camera buffer, pass it to rust for image processing. For instance, grayscale, gaussian blur, invert the image, etc.

sakex commented 1 year ago

Working on this branch