luasec icon indicating copy to clipboard operation
luasec copied to clipboard

Installation on an embedded Lua v5.1 (with no Lua Rocks)

Open nodecentral opened this issue 2 years ago • 5 comments

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 ?

nodecentral avatar Sep 22 '22 07:09 nodecentral

The makefile works fine for Linux/Mac/BSD. There is a Visual Studio project that can help for Windows.

brunoos avatar Sep 28 '22 19:09 brunoos

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?

nodecentral avatar Sep 28 '22 22:09 nodecentral

You need to check if your version of openssl is compatible with new versions of luasec.

brunoos avatar Sep 30 '22 19:09 brunoos

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?

nodecentral avatar Sep 30 '22 21:09 nodecentral

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.

brunoos avatar Oct 03 '22 18:10 brunoos

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?

nathangur avatar May 30 '23 15:05 nathangur

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.

brunoos avatar May 31 '23 16:05 brunoos

The embedded library is for a game for modding, hence why I can only include files.

nathangur avatar May 31 '23 19:05 nathangur

All I need is a simple http connection somehow without using require

nathangur avatar May 31 '23 20:05 nathangur

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.

brunoos avatar Jun 01 '23 19:06 brunoos

Can't use os or io. I don't know what FFI is.

nathangur avatar Jun 01 '23 19:06 nathangur

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.

alerque avatar Jan 06 '24 20:01 alerque