The first alpha release of luau-wasm packages the Luau language as a WebAssembly wheel for Pyodide, enabling browser‑based Luau scripting via a simple pip install.
Luau-wasm 0.1a0 has been released as a Pyodide‑compatible WebAssembly wheel. The package bundles the Luau runtime and compiler into a single WASM module that can be installed with pip and used directly in Pyodide environments. This follows the guide published earlier today on Publishing WASM wheels to PyPI for use with Pyodide.
Luau is a fast, gradually typed dialect of Lua originally developed by Roblox for scripting games and tools. By compiling Luau to WebAssembly and packaging it as a wheel, developers can run Luau code in the browser without needing a separate build step. The wheel includes the Luau interpreter, the type checker, and a small standard library, all pre‑compiled to WASM.
To try the new wheel, run pip install luau-wasm==0.1a0 inside a Pyodide shell or a notebook that uses Pyodide. Once imported, the module provides a luau object with functions such as luau.evaluate(source) and luau.compile(source). The wheel also ships a command‑line interface that mirrors the standalone Luau CLI, allowing scripts to be executed with python -m luau_wasm script.luau.
Current limitations include the absence of some debugging facilities that are present in the native Luau binary, and a slightly larger download size due to the bundled WASM binary. Performance is comparable to the native interpreter for most workloads, but heavy allocation patterns may see a modest overhead. The maintainers note that future work will focus on reducing the wheel size, adding support for Luau’s incremental type checking, and providing better source‑map integration for debugging.
Overall, luau-wasm 0.1a0 lowers the barrier for bringing Luau scripting to web‑based applications, educational notebooks, and any environment that can run Pyodide. By delivering a ready‑to‑install wheel, the project simplifies deployment and encourages experimentation with Luau outside of its traditional game‑engine context.
Comments
Please log in or register to join the discussion