Next-Generation Language Compatibility: Add an Optional Native WebAssembly (WASM) Runtime

Next-Generation Language Compatibility: Add an Optional Native WebAssembly (WASM) Runtime

Imagine developing Roblox experiences in your favorite programming language.

WebAssembly (WASM) has become the industry’s portable execution format, supported by a growing ecosystem of languages including C, C++, Rust, Zig, TinyGo, AssemblyScript, and many others.

By introducing an optional native WASM runtime, Roblox could become a truly language-flexible platform while preserving its existing sandbox, security model, and cross-platform support.

Luau would remain the primary scripting language, but developers would gain the freedom to choose the best language for the task.


Why This Matters

One of Roblox’s biggest barriers for experienced developers is the requirement to learn an entirely new programming language before they can begin building.

Supporting WebAssembly changes that.

Developers could bring existing knowledge, workflows, and codebases into Roblox through a standardized execution format instead of rewriting everything specifically for Luau.

Rather than asking developers to adapt to Roblox, Roblox would adapt to modern software development.


A Multi-Runtime Future

This proposal is not about replacing Luau.

Instead, Roblox would support multiple runtimes that complement each other.

Example optional setup

Luau

  • Gameplay logic
  • UI
  • Engine APIs
  • Rapid iteration
  • Beginner-friendly scripting

WebAssembly

  • Performance-critical systems
  • Numerical algorithms
  • Procedural generation
  • Compression
  • Navigation
  • Simulation
  • Existing native libraries

Each runtime can be used for anything.


Native WASM Instead of Translation

Rather than translating WebAssembly into Luau, Roblox could execute WASM directly through its own runtime.

This preserves the execution model WASM was designed for while allowing Roblox to expose only carefully sandboxed APIs.


Benefits

Lower the Barrier for New Developers

Developers already familiar with languages targeting WASM could begin building Roblox experiences without first learning an entirely new language.

Expand Roblox’s Ecosystem

Supporting an open industry standard would make Roblox attractive to a much wider range of software engineers and open the door to reusing existing libraries and tooling.

Cross-Platform by Design

WebAssembly was designed to be portable.

A native runtime could maintain Roblox’s cross-platform philosophy while providing a consistent execution environment across supported devices.

Secure by Default

WebAssembly executes inside a sandbox.

Roblox would continue to control:

  • available APIs
  • memory limits
  • execution budgets
  • permissions
  • communication with the engine

This preserves the platform’s security model while enabling significantly broader language compatibility.


Example cross runtime communication

local module = WASM.load(assetId)

local terrain = module:Invoke("GenerateTerrain", seed, width, height)

The exact API is flexible; the key idea is exposing a standardized runtime rather than requiring every language to target Luau.


Conclusion

Luau has been an excellent choice for Roblox scripting.

Adding an optional WebAssembly runtime would expand—not replace—that foundation.

It would enable language flexibility, attract developers from outside the Roblox ecosystem, encourage reuse of existing software, and position Roblox as a modern, multi-runtime development platform while preserving its sandboxed, cross-platform nature.

AI and Autonomous Agent Workloads

The software industry is increasingly adopting AI-assisted and autonomous development workflows.

As these systems continue to evolve, there is growing interest in executing inference, decision-making, planning, simulation, and other computational workloads directly within applications.

An optional WebAssembly runtime would position Roblox to support these emerging workflows by allowing developers to leverage mature WASM ecosystems and languages for computational components while continuing to use Luau for gameplay and engine integration.

Examples include:

  • AI-assisted NPC behavior
  • Planning and simulation systems
  • Navigation and decision-making algorithms
  • Procedural content generation
  • Data analysis and optimization
  • Future agent-based gameplay systems

This is not about replacing Luau. Instead, it enables developers to choose the runtime that best matches each workload.

As AI and autonomous software become increasingly important across the industry, supporting WebAssembly would help ensure Roblox remains adaptable to future development trends while preserving its existing sandboxed and cross-platform architecture.

That’s just unnecessary engine bloat for something you can already achieve with transpilation. It also seems unreasonably complex to implement.

4 Likes

Incorrect
Did you read the post?
Luau bytecode architecture is lacking features of WASM architecture that would’ve led to better optimization, and more so, transpilation has the same problem as building a VM in Luau.
Its deattached from the logic
You can’t 1-to-1 translate architectures ever.
That why specialization matters
Now have you understood why this matters?
Plus, no one would be using that seriously until it is implemented as a first-class feature.
Also, WASM already capable of compiling shaders, so having WASM would lead to an insane breakthrough towards this tech on Roblox.

1 Like

I know I’m just ragebaiting since this is your default response to almost all feature requests. While I would love to see this happen, I also think it’s just highly unlikely.

1 Like