-
Notifications
You must be signed in to change notification settings - Fork 116
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
No documentation on how to use LuaRocks with rlua #290
Comments
Hi, rlua wraps a stock Lua interpreter (https://www.lua.org/), so any Lua libraries should be available (for example https://luarocks.org/, which includes lua-http). What's missing is documentation on using (for example) LuaRocks with rlua. I think it should be straightforward (especially when using one of the system-lua options) - I will treat this issue as a documentation bug. Note that rlua by default disables loading non-pure-Lua libraries unless you call Lua::unsafe_new_with_flags and don't include the |
Oh my bad! I totally forgot github discussions were even a thing. I'll rename the issue more appropriately now that it's gonna be regarded as a documentation bug. I'm using the builtin 5.4 lua option, because I don't want to make people have to install lua just to get the program to work. Since currently there is no documentation on it, how would I use LuaRocks with rlua? |
I've done some investigation and experimentation, and have a proof of concept using LuaRocks (and some notes) from an rlua executable: https://github.com/jugglerchris/rlua_luarocks The example behaves enough like a |
EDIT: Previously titled "How to make HTTP requests with rlua?"
(Can't really find a more appropriate place to ask this question, if there's a better place, please point me to it!)
I'm trying out different crates that add scripting support, because I want to make a plugin system for my program that can add features without me having to expose them from the program (I want to keep the program minimal). The rlua crate is one of the ones I'm considering, but it seems like it lacks modules like http or socket in order to make requests.
This is one of the examples I could come up with of features that I don't see the point in adding to my program and then exposing for plugins to use if I'm never going to use that feature in the un-modded program.
Is there something I'm missing or is this outright impossible?
The text was updated successfully, but these errors were encountered: