Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Absolutely! Evan and the early team laid a strong foundation when Figma was ported to WASM + WebGL. It happened before my time at Figma, but check out these earlier posts from Evan and Jamie on the transition, perf testing, and graphs back from 2017-2018:

https://www.figma.com/blog/webassembly-cut-figmas-load-time-... https://www.figma.com/blog/figma-faster/



sort by: page size:

I can’t stand Figma, it’s limited, slow and in general, demonstrating nothing at all for its wasm use so that’s kind in support of my point. Something like Figma would get a lot more performance out of using WebGL. Which is only accessible through JS, and the emscripten bindings for it go through JS calls. So WASM is kind of a dead weight in this scenario.

Figma makes heavy use of WASM, WebGL and Web Workers it’s much more complicated than just rendering some shapes on a canvas with a scene graph.

What parts of Figma though? Is it just used for cpu intensive operations like triangulation of svgs to render in webgl or is the site's core logic all done is wasm?

I'm sorry, I don't use Figma but I'm really curious about its tech stack


Does this also use WebAssembly + WebGL like Figma?

They have a bunch of nice blogposts about that:

https://www.figma.com/blog/webassembly-cut-figmas-load-time-...

The main part of the app is in wasm, I believe (it's in C++ that they compile).


Oh yes! I love Figma and WebAssembly must have a big part in the responsiveness of this wonderful application.

Figma is a very heavy user of WASM. Was already in 2017: https://www.figma.com/blog/webassembly-cut-figmas-load-time-...

Figma renders its documents with WASM/WebGL, but the UI of the app is just HTML.

A fully GPU rendered web app is almost the worst of both worlds. You'll generally have massive code bundles and terrible a11y.


yeah, I agree too. One of the cofounders of Figma wrote some webGL demos. Damn those things are fantastic. Even Figma too, is an excellent piece of web software that can easily replace too.

I know that Figma is built on WebAssembly now, and has quite impressive performance.

> Figma isn't based on canvas, it's based on WebGL.

Aren't they the same thing?

And egui also talks about challenges with rendering on browsers using WebGL and WASM: https://github.com/emilk/egui/tree/master/crates/eframe#prob...


Figma (https://www.figma.com/) is a design tool that runs in the browser and makes heavy use of WASM. It's definitely slower than using a native app like Sketch, but not slow enough to be completely impractical. A few design people I work with here in India have switched to Figma from Sketch, and they seem very pleased with the results.

I can see WASM becoming useful for enabling apps that do real-time audio/video/image processing in the browser. Games are another obvious use case.

Maybe one day I'll be able to run an Ableton-lite right in the browser.


Figma is probably the biggest web application that uses it for the main feature they offer (the entire in-browser editor is C++ compiled to Wasm).

You can read more about how they use it here: https://www.figma.com/blog/webassembly-cut-figmas-load-time-...

> Because our product is written in C++, which can easily be compiled into WebAssembly, Figma is a perfect demonstration of this new format’s power. If you haven’t used Figma before, it’s a browser-based interface design tool with a powerful 2D WebGL rendering engine that supports very large documents.


You should read about the creation of Figma. Some applications require a certain level of performance or they just don’t have much value prop. WASM made figma possible

Figma already uses WASM and Rust.

> DOM tools can render to their own optimized GPU-accelerated canvas and ditch DOM outright.

This is literally exactly what Figma does.


That's super interesting, never heard that about Figma. Is the entirety of Figma in WASM or just the core drawing engine?

Figma existed before WASM was enabled in browsers so clearly that's not true. They claim WASM improved their load times by 3x, which is a lot, but enough to make the difference between viable and not? I doubt it.

> but if done correctly I believe that something like this can be useable for complex applications as well

I think this is one of the most fascinating "problems" in IT. There have been THOUSANDS of attempts to auto-convert design to code and it never works. It's been tried for at least 30 years now and still nobody solved this problem.. This leads me to believe we are solving the wrong problem.

I actually believe Flash was the closest thing to this holy grail. Except it was acquired by greedy Adobe that failed to evolve the product.

I am far from having a solution, I was just thinking that WASM is actually similar to Flash. What I mean is this: whole Figma can run in browser thanks to WASM. It has all the tools to visually create responsive websites in it. You can share Figma file as view-only. If I go to extreme, why not have Figma file in read-only mode on custom URL? No translation to HTML, just expose the Figma engine directly. (bandwidth and SEO problems are not impossible to solve)

At the end of the day, we are just trying to come up with different ways of adjusting same content for different screen sizes. It's a shame we are still losing this battle :-)


Yeah Figma is in WASM and it's great that it is. I don't see it coming for React apps, really. Or if it is, that the JS tooling itself will automatically convert it to WASM.

I personally use Flutter for a lot of my apps, as well as React/NextJS for SEO based apps, the combo works pretty well.

next

Legal | privacy