egghead.io
illustration for Get Started Using WebAssembly (wasm)

Course

Get Started Using WebAssembly (wasm)

  1. 1
    Create and Run a Native WebAssembly Function
    3m 12s
  2. 2
    Compile C Code into WebAssembly
    2m 36s
  3. 3
    Call a JavaScript Function from WebAssembly
    2m 46s
  4. 4
    Read WebAssembly Memory from JavaScript
    3m 3s
  5. 5
    Write to WebAssembly Memory from JavaScript
    3m 33s
  6. 6
    Allocate Dynamic Memory in WebAssembly with Malloc
    5m 44s
  7. 7
    Create and Import a WebAssembly Memory
    2m 55s
  8. 8
    Compiling C/C++ to WebAssembly using LLVM, Binaryen and WABT
    3m 23s
  9. 9
    Clone and Build LLVM with the Experimental WebAssembly Target
    2m 10s
  10. 10
    Install Binaryen and the WebAssembly Binary Toolkit (WABT)
    58s
  11. 11
    Typed Arrays in High Performance JavaScript
    4m 56s
  12. 12
    Step-by-Step JS to WebAssembly Conversion
    6m 38s
  13. 13
    A First Comparison of the Performance between JS and WebAssembly
    2m 34s
  14. 14
    Optimize Collision Detection in JS with a Grid
    4m 56s
  15. 15
    Surpass JS Performance with Optimized Collision Detection in WASM using a Linked List Grid
    6m 43s

Read WebAssembly Memory from JavaScript

Guy Bedford
InstructorGuy Bedford
  • javascript
    JavaScript

Share this video with your friends

Send Tweet

We use an offset exporting function to get the address of a string in WebAssembly memory. We then create a typed array on top of the WebAssembly memory representing the raw string data, and decode that into a JavaScript string.

WASM Fiddle: https://wasdk.github.io/WasmFiddle/?6wzgh

Demo Repo: https://github.com/guybedford/wasm-intro

Build your Developer Portfolio and climb the engineering career ladder.
  • Search
  • Talks
  • Podcasts
  • Machine
  • Pricing
  • Store
©egghead.io
Terms & Conditions