Skip to content

Luau support #59

Closed
Closed
@Milo123459

Description

@Milo123459

Activity

khvzak

khvzak commented on Jun 28, 2021

@khvzak
Member

Luau does not support object finalizers (__gc metamethod) that makes it impossible to use with Rust.

Milo123459

Milo123459 commented on Jun 28, 2021

@Milo123459
Author

Oh. Is there no work around?

khvzak

khvzak commented on Jun 28, 2021

@khvzak
Member

By the way, I cannot find link to download Luau source code. Apparently it's a commercial product not publicly available.

Milo123459

Milo123459 commented on Jun 28, 2021

@Milo123459
Author

I think there is a luau compiler?

Milo123459

Milo123459 commented on Jun 28, 2021

@Milo123459
Author

Or - just use Lua 5.1 and add the type system.

Milo123459

Milo123459 commented on Nov 3, 2021

@Milo123459
Author

https://github.com/Roblox/luau has now been opensourced.

khvzak

khvzak commented on Nov 3, 2021

@khvzak
Member

This is great news, I'll take a look, thanks!

Milo123459

Milo123459 commented on Dec 30, 2021

@Milo123459
Author

Any updates? Hate to bump, but genuinely curious.

khvzak

khvzak commented on Dec 31, 2021

@khvzak
Member

No news yet. Luau is very different from vanilla Lua and couple of weeks ago even didn't have C interface.
Although I'm not sure about the current status of C interface (how usable is it).

khvzak

khvzak commented on Dec 31, 2021

@khvzak
Member

Just curious, is there any advantages to use Luau instead of normal Lua or luajit?

Milo123459

Milo123459 commented on Dec 31, 2021

@Milo123459
Author

To be honest, I like using it for the types. It has TypeScript like types, which makes me more or less feel at home with it.

ildar

ildar commented on Jan 3, 2022

@ildar
Milo123459

Milo123459 commented on Jan 3, 2022

@Milo123459
Author

There are also some other beta-features that I would like to use in Luau. Still, Teal does satisfy me (I use it a lot) this would be cool, still.

grilme99

grilme99 commented on Jan 12, 2022

@grilme99

Luau support would be great.

Just curious, is there any advantages to use Luau instead of normal Lua or luajit?

This is covered in their docs but essentially the tl;dr is that it is progressively typed and the performance is on-par with LuaJIT in certain cases and outperforms standard Lua in all cases. Roblox could never use JIT themselves because certain target platforms either do not support it or do now allow it (e.g. Apple with iOS).

It's based on Lua 5.1 but sprinkles in some of the best parts of later Lua versions. Luau has an amazing sandbox built-in which can guarantee* safety, even when running completely arbitrary and actively malicious code - perfect for game mods etc. The sandbox also has support for interrupts, which is pretty nice.

khvzak

khvzak commented on Feb 23, 2022

@khvzak
Member

I pushed initial Luau support to the dev branch
It passes tests and works in vendored only mode by default.

So the next mlua v0.8 will get luau support including emulating some of the missed features like userdata values, require, etc.

khvzak

khvzak commented on Mar 22, 2022

@khvzak
Member

just released v0.8.0-beta.1 with Luau support

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @khvzak@ildar@grilme99@Milo123459

        Issue actions

          Luau support · Issue #59 · mlua-rs/mlua