frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Powering React with Python (WASM)

https://medium.com/@olokobayusuf/powering-react-with-python-wasm-a7f3c52e34ad
3•olokobayusuf•7mo ago
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!

Comments

olokobayusuf•7mo ago
Link to original article that kickstarted all of this: https://medium.com/@eugeniyoz/powering-angular-with-rust-was...