-
Congratulations on the new release 🎉 The new Luau support looks very nice! I read about some of your comments in #59 and I'd like to ask a bit more about it:
EDIT: I just tried downloading the new version and it seems to work, but I tried annotating some functions and I can't seem to trigger any type errors or warnings. What's the workflow to ensure the extra type checks in Luau are exposed to the user? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Not userdata itself, but associated uservalues are emulated using the registry and weak tables.
Yes, Luau does not support modules out of the box (as I see the Luau code).
Yep, the function I added
It's vanilla Luau. Major difference is lack of
As I see, Luau compiler ignores any type annotations and they needs to be checked first by Luau analyzer. You can download binaries here Also Luau supports |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answers! I am working on an extension layer for my project, and so far
Ah! I didn't even know about uservalues. Thanks for clearing that up.
Would it be possible to include the analyzer in
Very nice! I was just asking about some lightweight way to share vectors between rust and lua. While tables work, I am super interested in having something more performant that doesn't require allocations. The main use case for the Lua layer in my project is lua callbacks that get vectors, do some math, and return vectors, so that is my number 1 bottleneck.
Definitely interested on that too! I'll be keeping an eye on future updates 😄 |
Beta Was this translation helpful? Give feedback.
Not userdata itself, but associated uservalues are emulated using the registry and weak tables.
Uservalue is a custom data attached to userdata via
set_user_value
.This is how it's emulated
It's definitely slower than in Lua 5.4, but still in my opinion very nice feature to have.
Yes, Luau does not support modules out of the box (as I see the Luau code).
They emulated require in the CLI repl program here
Yep, the function I added