I benchmarked my Rust/WASM engine vs my hand-optimized TypeScript in a Figma plugin (it was a tie)
Hi everyone. I just published an article about a Figma plugin I built with a Rust engine compiled to WebAssembly, and I wanted to share it here.
Two years ago I wrote that Rust could be "10x faster" than JavaScript. This time I had a real product to test that on, so I benchmarked the Rust/WASM engine against my own hand-optimized TypeScript. The speed came out as a tie, which honestly surprised me. The more interesting part was finding where Rust was still worth it (memory, steady frame times, the image crate for codecs) and where it was not.
I tried to be honest with the numbers, and the whole benchmark is public so anyone can run it.
Article:
Benchmark repo:
https://github.com/bserefaniuk/wasm-vs-ts-warp-bench
Happy to answer questions, especially about the Figma sandbox side: no threads, and loading the WASM from inlined bytes because the iframe cannot fetch. I would also like to hear how others approach the "Rust or not" decision on a hot path.