Skip to content

Instantly share code, notes, and snippets.

@bushidocodes
Last active July 30, 2020 23:47
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bushidocodes/19663642453c918d7868bf1ac5a563a4 to your computer and use it in GitHub Desktop.
Save bushidocodes/19663642453c918d7868bf1ac5a563a4 to your computer and use it in GitHub Desktop.
WebAssembly Summit 2020 Notes

WebAssembly Summit 2020

https://webassembly-summit.org/

Lin Clark's Talk - "WebAssembly Nanoprocess"

https://www.youtube.com/watch?v=IBZFJzGnBoU

  • the missing functionality alongside WASI and Interface Types is something that provides "capability-based security".
  • Delegation of permissions to propagate down transitive dependencies
  • plan to use fine-grain form of per-module virtualization
  • A "WebAssembly nanoprocess" is just wasm, but follows a particular pattern.
  • Build dependency trees of isolated packages, each wrapped in a nanoprocess
  • Principle of Least Authority
  • This is a pattern and set of conventions that we need to bake into our tools
  • ByteCode Alliance is building tools to make it easier to integrate these patterns

So. Not super new. I just missed didn't actually read this stuff when ByteCode Alliance was announced:

Shipping Tiny WebAssembly Builds

https://www.youtube.com/watch?v=_lLqZR4ufSI

  • C/C++ traditionally doesn't try to optimize for small builds
  • libc is often packed in modules
  • Binaryen's wasm-opt can help optimize wasm file size. Usually ~20% smaller
  • Emscripten, wasm-pack, AssemblyScript run this for you
  • Otherwise wasm-opt input.wasm -o output.wasm -O
  • Web App: https://webassembly.github.io/binaryen/shrink.html
  • C/C++ stuff to consider disabling
    • -fno-exceptions
    • -fno-rtti
  • C++ virtual calls break dead-code elimination
  • In general, prefer simple C over C++ standard lib
  • With Emscripten, consider using emmalloc over dlmalloc (-s MALLOC=emmalloc), which is 1/3 the size
  • Rust
    • dynamic dispatch inhibit DCE
    • You can consider no_std
  • Go. The full runtime is 2MB, so use TinyGo instead
  • AssemblyScript generally integrates best practices

Will Wasm kill JavaScript?

https://youtu.be/J5Rs9oG3FdI

  • Wasm won't kill JS
  • Call to arms to get Wasm to the point of Adobe Flash deployment

JavaScriptCore's New WebAssembly Interpreter

https://www.youtube.com/watch?v=1v4wPoMskfo

  • General Overview of Apple's JIT compilers in Safari / WebKit
  • Two-tier JIT. Added Interpreter in front.

WebAssembly Music

https://youtu.be/C8j_ieOm4vE

WebAssembly IOT

https://youtu.be/oky3FdsTuUM

Building a Containerless Future - Kevin Hoffman

https://youtu.be/vqBtoPJoQOE

WebAssembly as a

https://www.youtube.com/watch?v=rGhasYrH5Vo

  • Wikipedia polyfills video on certain browsers with Wasm. 🤔
  • Interesting history lesson on patents and licensing on media formats in open-source browsers
  • Discussion of SIMD vector ops
  • Issue is the combinatorial explosion of build options for threads, SIMD, etc., especially for companies with a generous browser support matrix

Closing Keynote. WebAssembly: Expanding the Pie

https://youtu.be/ptAhZLn9waI

@steipete
Copy link

@chirag64
Copy link

Thank you so much for this 👍🏼

@adrianiskandar
Copy link

Interesting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment