Simon Willison: TILs on webassembly

Atom feed for webassembly

webassembly Run Python code in a WebAssembly sandbox - 2023-02-02

I've been trying to figure this out for ages. Tim Bart responded to my call for help on Hacker News with this extremely useful code example showing how to run Python code in WebAssembly inside Python, using wasmtime-py and the new Python WASM build released by VMware Wasm Labs. …

webassembly Compiling to WASM with llvm on macOS - 2022-03-28

howto-wasm-minimal by Zalka Ernő (my fork here) is a neat demo of a minimal WASM module. It uses C++ to define functions for simple image manipulation including blurring an image, compiles it to WASM using llvm/clang++, then uses JavaScript to run those functions against an image loaded into a <canvas> element. …