-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way of adding lua modules ? #71
Comments
Also, I noticed the discord link, in this repo and others, is expired :) |
You definitely want to embed c lua modules in the core itself (allowing the load of .so/.dll will basically break every security measure). This is probably one of the best articles on the topic: https://leiradel.github.io/2020/03/01/Embedding-Lua-Modules.html In your case embedding luasockets should be enough. Regarding the discord link it is still valid (there are people still joining even today), which error are you getting ? |
Did you get this working? I'm still in early stages but trying to grasp how the pipeline will be if I use lua for a lot of code (as it's a much more comfortable environment for me than C++ or blueprints). Would we hack the additional embeds into LuaState.cpp? Looks like that's where the preload table is added. This SO post talks about including socket+mime (required) I was hoping to get mysql database access (for the server) via lua as well, but it sounds more complicated - maybe the luasql library isn't made for full c++ importing & needs additional prototype classes? https://stackoverflow.com/questions/12236032/how-to-embed-luasql-sqlite3-in-a-statically-linked-c-program |
I intend to use lua to make api calls, because it is much less cumbersome than blueprints when it comes to formating a string or extracting data from json. I tried to add a pure lua implementation of "requests" but it fails because it needs network support from the engine.
Is there any way to add not-pure-lua modules to the lua engine used here, like you would do with luarocks ?
Blueprints are very good for certain things, C++ for others, but I think there is still room for a traditional scripting engine too.
The text was updated successfully, but these errors were encountered: