LuaU - FileSystem support? Is there any at all?

Context
I’m in the middle of writing my own LuaU Interpreter - in LuaU, and I’ve chosen to avoid running a few tests in studio ~ instead to run the native LuaU binaries on my system instead.

Now, when I initially started writing up the basics, I saw a lot of fundamental problems. One being the idea that Lua has no sense of Input-Output, the only handle we have is print (If I am correct? Maybe not) and I believe that’s limiting in many factors…

Moving on ~ I drafted up the generic type of framework which’ll help to run my interpreter, and then I noticed that the require is also limited in it’s factor to actually require something?


Require

To require a module, you need to reference everything in the CWD to get to a file, which is alright, if we’re not bringing in dependencies, but what if we are?

Would these dependencies need to account for this flaw? I noticed in Lua 5.x you can manipulate the state of that path by using Package ~ but LuaU doesn’t have this, are we meant to pass the psuedo location of the dependency?


Ideas

Maybe a Package Manager for LuaU would solve this? Following what Wally has ~ could we not create a packages index and then initiate those packages with the psuedo path to them?

luau has no filesystem since roblox is based on instances (sorry i didnt understand your whole writing)

Bummer, some support outside of roblox would be nice too, but that might be asking too much of roblox :thinking:

I would personally implement these libraries myself, but i’m unable to compile a standard lua c module, so i’m not sure if LuaU even accepts DLL’s as an input for their Require…

File system access would cause a ridiculous amount of problems
Mainly, what is roblox going to do if people find out how to escape the sandbox or run arbitrary code with full file system access lol

I could he entirely misunderstanding the question and you mean imports, but it seens like you’re asking for something that could cause a huge problem

Maybe I wasn’t so clear, I mean LuaU, not roblox’s engine, what is the point if you create a Language if you are unable to actually use that language?

These factors are just limiting, if they can provide additional support for their engine (task for example doesn’t exist in LuaU) then they can provide support for the language as well?

1 Like

Task does exist in LuaU.

task.wait
task.spawn
task.delay

And more.

Incorrect, that global only exists on Roblox, not in the actual language…

image

Oh. I didn’t even know you can use LuaU in other engines. I’m not sure why it doesn’t exist there. That’s stupid.

Ahh i see what you mean, I don’t personally use LuaU outside of the roblox engine, so i haven’t run into that

Now that i think of it, i remember require being able to load files like the import function in python

Didn’t know they didn’t even have the task library in it, that’s crazy

Because task interacts with the Roblox task scheduler. Luau doesn’t have a task scheduler as Luau isn’t an engine.

Perhaps you should create an issue on the official GitHub page, because it’s related to standalone Luau and not Roblox.

But why? Just curious. If this interpreter is for Roblox then you should probably be testing it in a Roblox environment.

1 Like

I mostly use Rojo & Sync my work to a Studio testing session, but testing on Roblox wastes seconds that I could avoid using LuaU binaries ~ only downside is how undeveloped it is…

That being said, the code will have support for rojo, it’s just tests which I need quick resolves for that I prefer running directly instead

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.