Speaker Russell Keith-Magee
Time 2019-08-02 13:30
Conference PyCon Au 2019
Talk details Link

Web has become more reliant on JavaScript. A lot harder to ignore JavaScript. Users expect rich client side functionality.

Levels of abstraction:

  1. Machine code
  2. Assembly code
  3. Compiled languages
  4. Interpreted languages
    • Just-In-Time compilation. Interpretor has to be ready to do just about anything, because the code can do just about anything. JIT will optimize code at run-time to optimize performance.

Exploiting JIT loopholes


100% legal JavaScript code, with weird coding conventions that give low level primitives that directly map to machine code.


Binary format that optimizes sending asm.js code.

Web Assembly Binary Toolkit

WAT: WebAssembly Text

WASM doesn’t support strings natively. Strings need to be supported with lists.


  • C –> WASM
  • Rust –> WASM

Use cases:

  1. Deploying full application in C to browser. e.g. port Quake to browser. QT support.
  2. Optimize hot loop.



  • Python
  • Pyodide: C Python source compiled to wasm.
  • Downside: big. 3Mb to 12Mb.
  • Micropython - on npm. Experimental.
  • Betavia 2.0
  • Wasmer