Outlook Respawn LogoOutlook Respawn Logo
Roblox characters dressed in various costumes, including a knight, a cardboard robot, a construction worker, a pirate, and a classic yellow-faced avatar.

Roblox Uses JSPI to Bring Games Directly to Browsers

Roblox Uses JSPI to Bring Games Directly to Browsers

Roblox launches browser gaming on Chrome without app downloads.

02 DEC 2026, 04:00 PM

Highlights

  • Roblox announces a new way to access games through web browsers.
  • The beta initially supports Chrome on desktop and Android.
  • The company explains the technical changes behind its browser gaming deployment.

Roblox has begun rolling out a public beta that allows account holders to launch games directly through Chrome on desktop and Android without downloading the application. Announced on Dec 1, 2026, the technology uses JavaScript Promise Integration (JSPI) to bring the platform's existing C++ engine to browsers.

Support for additional browsers is planned over the coming months.

What Challenges Did Roblox Face With Browser Gaming?

According to Principal Software Engineer, Fatih Bakır, adapting the engine's networking, rendering, and content delivery systems was necessary, but concurrent programming presented the biggest challenge.

Roblox traditionally used operating system-managed threads to execute multiple tasks.

However, switching between threads consumes CPU cycles, particularly when tasks wait for network responses or locks. The company explored fibers, lightweight execution units that can pause and resume without involving the operating system.

WebAssembly (Wasm) created another obstacle because it cannot directly manage execution registers and stack pointers. Meanwhile, Roblox's two-decade-old C++ code relies on blocking operations. This caused a deadlock during initialization when the engine waited for an HTTP response that the browser could not deliver until the engine returned control.

The company tested Asyncify, which rewrites functions to support suspension, but encountered code bloat and performance problems. A second attempt using JavaScript Web Workers progressed to game joining on a high-end MacBook but exhausted memory on Android.

JSPI Improves Roblox's Browser Performance

Roblox eventually adopted JSPI, a Chrome-supported Wasm feature that suspends execution while JavaScript Promises resolve. This allowed existing C++ functions to operate without extensive asynchronous rewrites.

Its performance comparison against the thread-based approach showed:

  • Context switching: 14 times faster.
  • Fiber creation: 250 times faster.
  • Fiber destruction: 35 times faster.
  • Memory per fiber: Reduced from 3.1 MB to 44 KB, approximately 70 times less.

The implementation also encountered a Chromium memory leak that retained suspended JSPI stacks after fibers ended. Roblox addressed this using WebAssembly traps to unwind stacks and release memory.

Bakır explained that JSPI allowed Roblox to build its core fiber functions in "a few dozen lines of JavaScript," preserving the engine's existing blocking operations in browsers.

Probaho Santra is a content writer at Outlook India with a master’s degree in journalism. Outside work, he enjoys photography, exploring new tech trends, and staying connected with the esports world.

Published At: 02 DEC 2026, 04:00 PM
Tags:Roblox