---
title: "The evolution of Figma’s mobile engine: Compiling away our custom programming language"
description: "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."
url: "https://swe.quest/articles/the-evolution-of-figma-s-mobile-engine-compiling-away-our-custom-programming-4555b49211ef8f02"
canonical: "https://www.figma.com/blog/figmas-journey-to-typescript-compiling-away-our-custom-programming-language/"
source: "Figma"
published: "2024-05-01"
difficulty: "medium"
kind: "Case study"
reading_minutes: 16
tags: ["refactoring","typescript","compilers","performance","javascript"]
---

# The evolution of Figma’s mobile engine: Compiling away our custom programming language

A post on [Figma](https://swe.quest/sources/figma.md), published 2024-05-01, 16 min read, Case study. Original: [https://www.figma.com/blog/figmas-journey-to-typescript-compiling-away-our-custom-programming-language/](https://www.figma.com/blog/figmas-journey-to-typescript-compiling-away-our-custom-programming-language/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- compiler frontend/backend basics ([easy posts on Frontend](https://swe.quest/tags/frontend.md?difficulty=easy))
- TypeScript ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- JavaScript bundling and source maps ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Skew, TypeScript, Figma, WebAssembly, source maps, devirtualization, esbuild

## Related posts

- [Migrating a Large Flow Monorepo to TypeScript](https://swe.quest/articles/migrating-a-large-flow-monorepo-to-typescript-750b673839e64549.md): Yelp Engineering · 2026-08-04 · Medium · 11 min read · TypeScript, Refactoring & migrations, JavaScript, Type systems, Build systems
  Yelp migrated 1.4 million lines of Flow-typed JavaScript in a Lerna monorepo to TypeScript over three and a half years, converting one package at a time without ever bulk-disabling typechecking.
- [Figma rendering: Powered by WebGPU](https://swe.quest/articles/figma-rendering-powered-by-webgpu-713739b05df2d0bb.md): Figma · 2025-09-18 · Medium · 11 min read · Browsers, WebAssembly, C & C++, Performance engineering, Deployment
  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.
- [Keeping Figma fast](https://swe.quest/articles/keeping-figma-fast-eb21da7244ac5731.md): Figma · 2023-08-29 · Medium · 14 min read · Performance engineering, Testing, CI/CD, Web performance
  Figma replaced its single-MacBook performance testing setup with two systems sharing one CI scheduler.
- [How Figma draws inspiration from the gaming world](https://swe.quest/articles/how-figma-draws-inspiration-from-the-gaming-world-d8a336bcdbd13832.md): Figma · 2023-05-03 · Easy · 13 min read · Real-time systems, WebAssembly, System design, Games, Debugging
  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.
- [We Have to Start Over: From Atom to Zed](https://swe.quest/articles/we-have-to-start-over-from-atom-to-zed-8db3be76f03d8a79.md): Zed · 2024-02-12 · Easy · 25 min read · Rust, Developer tools, Performance engineering, Data structures
  Zed's co-founders explain why they abandoned Atom's Electron/JavaScript stack and rebuilt a code editor in Rust: JavaScript's pointer-chasing arrays, uncontrollable GC pauses, and the costly JS/C++ boundary for multithreading made performance work feel like fighting the platform.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
