Figma rendering: Powered by WebGPU
Figma migrated its C++ renderer from WebGL to WebGPU while keeping WebGL as a fallback, first refactoring its graphics interface to pass draw-call state explicitly and to batch uniform uploads into a single buffer per submit to avoid performance regressions. Legacy WebGL 1 GLSL shaders are kept and automatically translated to WGSL via a custom shader processor plus naga, and Dawn is used for both the Emscripten/Wasm build and native server-side builds. Because WebGPU only supports asynchronous readback and can fail mid-session on Windows, Figma built a dynamic fallback that swaps backends to WebGL at runtime and blocklists devices by fallback rate. Benchmarks across Windows, Mac and ChromeOS showed gains on some device classes and neutral results elsewhere with no regressions, and compute shaders, MSAA and RenderBundles are next.
Related posts
- Keeping Figma fast
Figma mediumAdept
Figma replaced its single-MacBook performance testing setup with two systems sharing one CI scheduler. The first runs end-to-end tests in headless Chromium on GPU-enabled cloud VMs for every pull request, finishes within 10 minutes through parallel runs, and uses a 20% pass margin to catch large regressions despite VM noise. The second is a small fleet of older real laptops for on-demand runs such as bisecting subtle regressions and benchmarking hot-path optimizations. Instruction counting and a full device farm were rejected because Figma's WASM/WebGL workload is bound variously by CPU, GPU and I/O. Case studies show the setup validating rendering time-slicing that prioritizes local edits over remote multiplayer changes, improving perceived frame rate on slow devices.
- WebGPU now available for testing in Safari Technology Preview
WebKit mediumAdeptSafari Technology Preview 185 ships an early WebGPU implementation, enabled via the "WebGPU", "GPU Process: DOM Rendering" and "GPU Process: Canvas Rendering" feature flags. A walkthrough of the core API shows requesting an adapter and GPUDevice, configuring a GPUCanvasContext, building a GPURenderPipeline from a WGSL shader module, and encoding and submitting a draw call through a GPURenderPassEncoder. A complete WGSL vertex/fragment shader draws a colored triangle, and developers are asked to try the WebGPU samples and file bugs at bugs.webkit.org.
- How Figma draws inspiration from the gaming world
Figma easyNovice
Figma's architecture resembles a game engine more than a typical web stack: a C++ canvas compiled to WebAssembly for 2D rendering, a React/TypeScript UI layer, and a Rust multiplayer server, plus layered systems for multiplayer, animation, collisions, chat and plugins. Because these systems are interdependent, bugs cross boundaries; a layout change from six months earlier made FigJam connectors oscillate between clients, flooding multiplayer messages and overloading autosave. Making FigJam tables collaborative without locking required resolving concurrent edits and adding an animation system so observers can follow row and column moves.
- Introducing @huggingface/kernels: 200+ WebGPU Kernels for Local AI
Hugging Face mediumAdeptHugging Face released @huggingface/kernels, a JavaScript loader for 207 Apache-2.0 WebGPU kernels published as versioned Hub repositories. Each repository bundles a manifest contract, correctness and benchmark cases, and Jinja-templated WGSL shaders with multiple variants per shape and device. On an Apple M4, 809 comparable cases ran 2.57x faster by geometric mean (1.90x median) than ONNX Runtime Web's WebGPU backend, with some outliers in Einsum and CumSum exceeding 300x. Those figures measure GPU time per operation, not full models. Fleet, an in-browser benchmarking tool, crowdsources correctness and performance results across real devices to improve variant selection.
- The evolution of Figma’s mobile engine: Compiling away our custom programming language
Figma mediumAdept
Figma migrated its prototype viewer's mobile engine from Skew, an in-house compile-to-JavaScript language, to TypeScript using a custom Skew-to-TypeScript transpiler and a three-phase rollout (write/build Skew, write Skew/build TypeScript, write/build TypeScript) that never paused development. The move became viable once mobile WebAssembly support let hot paths move to the C++ engine, removing the need for Skew's optimizing compiler. Transpiler pitfalls included slow JavaScript array destructuring (direct indexing improved per-frame latency by up to 25%), behavior differences from Skew's devirtualization that broke Smart Animate on null receivers, and TypeScript's initialization-order rules. Source maps were maintained so developers could keep debugging throughout.