~/talk

Rust wasm: Browser games!

Talkat NDC Oslo 2021 · 2021-11-29..12-03· [webassembly, creative-coding]
links:none on file
slides:none on file

Builds a browser Breakout clone using Rust compiled to WASM with Bevy as the engine and wasm-bindgen for JS interop; compilation needs a web-specific renderer swap (WebGL) and Cargo feature flags. Native release starts ~12.1 MB, LTO+size flags drop to ~10.4 MB, and running wasm-opt brings it down to ~5.2 MB. Notes single-threaded WASM, missing WebGPU support in browsers, limited audio/gamepad support, and that the game runs in-browser after the build and bundling steps.

AI-written summary · about

  1. 0:00Start
  2. 7:10Let's talk about Rust, baby
  3. 9:03What do I like about Rust? / Why do I like Rust?
  4. 11:02Why is Rust the right tool for the job?
  5. 15:46Choices, choices!
  6. 19:54Breakout!
  7. 20:31What changes do you need to make when going from desktop?
  8. 24:55Wiring everything together
  9. 27:48Make the package smalle
  10. 32:20Post-processing with wasm-opt
  11. 34:09Code profiling and further tweaks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.