CODING FIBONACCI IN WEBASSEMBLY BY HAND | Looping and Branching | Introduction to WebAssembly (WASM)

Опубликовано: 06 Октябрь 2024
на канале: Chris Hay
1,718
71

this video is really a deep dive into how loops (while, for) and branching (if, while) works in WebAssembly. we do this by hand-coding a Fibonacci function in WebAssembly (WASM) with WebAssembly Text language (WAT). to do this, we first understand what a Fibonacci sequence is.. how it would be coded in JavaScript and how you can translate code from JavaScript to WebAssembly. What this makes video unique is the techniques you can use to migrate code from JS or Pseudocode to WebAssembly. We obviously take a test-driven approach and write our WebAssembly Unit Tests first in Jest before handcoding our WASM.