top | item 43764169

Show HN: Powering React with Python (WASM)

3 points| olokobayusuf | 10 months ago |medium.com

A few weeks ago, Theo T3 posted a read-through of a Medium article showing how to augment an AngularJS website with WebAssembly in order to compute a factorial.

I've been building a general(-ish) purpose Python compiler, mainly focused on numerical computing and AI inference. I figured it would make a good exercise to create something similar, this time with a bit more number crunching.

I vibe-coded a Lightroom-esque image editor UI (thanks Claude!) then wrote a tiny Python function that does a contrast adjustment using PyTorch. It gets compiled to wasm with what I'm building, and runs blazing fast thanks to vectorized 128-bit wasm intrinsics (I wonder if we'll get 256-bit anytime soon).

Play with it here: https://github.com/olokobayusuf/photo-editor . I'm exploring building a WebGPU-powered tensor framework to go even faster. Let me know what you think!

1 comment

order