luasec
luasec copied to clipboard
Installation on an embedded Lua v5.1 (with no Lua Rocks)
Hi
I’m using an embedded version of Lua, so my install options are a little limited, however I am able to place standalone Lua files/modules into the file structure.
it possible to installed this without Lua Rocks ?
The makefile works fine for Linux/Mac/BSD. There is a Visual Studio project that can help for Windows.
Thanks so much for responding, it’s an old embedded linux OS (mips processor etc).- does that play a part? Also I’ve just run a command at it suggest I currently have 0.4 of luasec, is that an issue to upgrade?
You need to check if your version of openssl is compatible with new versions of luasec.
Hi, thanks Ok, checking the OpenSSL version installed on this embedded system, its says the following..
# openssl version
OpenSSL 1.0.2l 25 May 2017
Checking your guidance, i thinks it’s 1.0.x -> https://github.com/brunoos/luasec/wiki/LuaSec-1.0.x
without being able to use Luarocks, any idea how I upgrade from luasec 0.4 to 1.0.x?
Well, in normal situation, make linux
will build the library.
If it issues an error about not finding .h
, you need to edit Makefile
and adjust CFLAG
.
But, if you are crosscompiling, maybe you need to set CC
and LD
also.
I'm on windows, and I also have a embedded lua 5.1 library that doesn't allow for requires either. Could this library still be used?
As an external module, I don't think so. If you could rebuild the embedded library, you could try to integrate luasec as internal module.
The embedded library is for a game for modding, hence why I can only include files.
All I need is a simple http connection somehow without using require
You need network functions to make http calls, but Lua does not have a standard module for it.
If your library has io.popen
or os.execute
, you can try to use other program (like curl).
Another way is FFI
, if available.
Can't use os or io. I don't know what FFI is.
If you are using a Lua VM that has require()
and all external module loading plus io.
and os.
internal modules disabled then this project can't help you.
Get a full Lua VM.