When two people edit the same Figma file, their changes need to stay in sync. In 2018 Figma described moving document processing from its TypeScript multiplayer service into Rust: a Rust process handled each document, while Node.js handled network traffic. The browser canvas was a separate system: Figma described building it in C++ and compiling it to WebAssembly.
Read Figma Engineering on the multiplayer server rewrite and on how the browser canvas and UI fit together.