Unfortunately not, it is the whole Compiler and VM. I'm not super familiar with embedding Luau only having messed around with it for a bit, but I highly doubt it'd be too difficult to drop in Luau over top an existing Lua implementation
Thanks!
I found Teal, which seems to Lua what TypeScript is to JavaScript
Re:You can now write React in Lua
by hombre_fatal on Monday June 24, 2024 @11:41AM
(#40777388)
I use Teal for Pico8 game development. It's great.
Re:You can now write React in Lua
by boredtofears on Monday June 24, 2024 @02:25PM
(#40779206)
There's also a Typescript to Lua transpiler https://typescripttolua.github.io/
I've used it successfully with Love2d projects (albeit with some quirks)
Lol, that's great.
What are the quirks?
Re:You can now write React in Lua
by boredtofears on Tuesday June 25, 2024 @12:32PM
(#40790527)
Mostly that Lua datatypes don’t always have great analogs in TS (particularly tables) and you have to be pretty cognizant of what’s going on under the hood.
All of these, too: https://typescripttolua.github.io/docs/caveats
Interesting, what do they do about missing type info? Is there some repo of types for popular libraries?
No idea, probably nothing.
There's the official teal-types[1] project that aims to fill that gap only for standard Lua. I've used the LÖVE types[2] in the past.
1: https://github.com/teal-language/teal-types/tree/master/type... 2: https://github.com/MikuAuahDark/love2d-tl
Re:You can now write React in Lua
by MenhirMike on Monday June 24, 2024 @12:44PM
(#40778205)
No, Luau is a new programming language that's based on Lua.
I'd love to have type annotations in Lua.
But this doesn't compile to Lua, right?