Skip to content

Add support for Luau #204

Open
Open

Description

@jmkd3v

Luau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua.
https://luau-lang.org

Lupa should have support for Luau. Luau's C APIs have some variations. There is not currently a documented list of these changes, but this GitHub issue is tracking that: luau-lang/luau#251

Activity

  1. scoder commented on Feb 23, 2022

    @scoder
    Owner

    If this can be done (mostly) via C macros, and doesn't add too much to the maintenance burden, and assuming that luau is not just someone's hobby language but something that is actually being used (I had never heard of it myself), I wouldn't object to looking at a PR. Once there is a working implementation, this can be added to the list in #196

  2. jmkd3v commented on Feb 23, 2022

    @jmkd3v
    Author

    If this can be done (mostly) via C macros

    I've never worked with Lua or Luau's C APIs, but from the changes listed in luau-lang/luau#251 I don't think it can be done mostly with C macros.

  3. awildergoose commented on Apr 9, 2023

    @awildergoose

    Up, Luau is a great variation of Lua, It was made by Roblox and is the current language for scripting, The best features are probably the typing and that it runs JIT (just line LuaJIT) and it's very fast and continuously being maintained

  4. jmkd3v commented on Apr 9, 2023

    @jmkd3v
    Author

    Up, Luau is a great variation of Lua, It was made by Roblox and is the current language for scripting, The best features are probably the typing and that it runs JIT (just line LuaJIT) and it's very fast and continuously being maintained

    Luau doesn't run JIT:

    While Luau doesn't currently implement JIT/AOT, this is likely to happen at some point; beyond the usual implementation challenges and security concerns, one significant limitation is that we don't have access to JIT on many platforms so for us maintaining excellent interpreted performance for gameplay and application code is more important than reaching peak FLOPS on numerical code.

    https://luau-lang.org/why

  5. awildergoose commented on Mar 15, 2024

    @awildergoose

    Sorry for the bump but, any news on this? Really looking forward to it.

  6. Hedwig7s commented on Apr 10, 2024

    @Hedwig7s

    I would highly recommend this be implemented as Luau implements a lot of useful stuff such as typechecking, assignment operators and buffers while also being fully compatible with Lua 5.1 and being more optimized
    It also has a JIT compiler now

  7. cheesycod commented on May 18, 2025

    @cheesycod

    Same here, would like to see it implemented

  8. scoder commented on May 19, 2025

    @scoder
    Owner

    I'd be happy if someone tried it. Getting the Luau repo checked out as a git submodule into the third-party/ directory and integrating it into the build (see setup.py) shouldn't be too difficult. That'll show whether it then works out of the box or requires some code adaptations.

    The VM implementation appears to be here: https://github.com/luau-lang/luau/tree/master/VM

  9. Hedwig7s commented on May 19, 2025

    @Hedwig7s

    I'll be honest I don't think there's a chance it would work out of the box the C API had a wrecking ball taken to it

  10. cheesycod commented on Aug 21, 2025

    @cheesycod

    So, about this... I'm considering making my own bindings for Luau in python using Rust/PyO3 since my prior work on making Go bindings with Rust (gluau) also worked really nicely.

    I agree with @Hedwig7s that it probably wouldnt work OOTB with Lupa, the C API is very different

  11. cheesycod commented on Aug 26, 2025

    @cheesycod

    So some good news here, I decided to take a stab at it and managed to get the thing to at least compile and load the VM/gccollect and destroy itself right. Panic handler also fires correctly. Userdata dtors are not implemented yet so theres a memory leak for all userdata uses rn but thats expected this early on.

    Theres still a ton of errors and segfaults/aborts due to some memory related things (as well as some APIs which throw on Luau but not on normal Lua when memory limits are present) but i'll make a draft PR for it @scoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions