Settings

Theme

Show HN: Powering React with Python (WASM)

medium.com

3 points by olokobayusuf 8 months ago · 1 comment · 1 min read

Reader

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!

olokobayusufOP 8 months ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection