Minimum Lua with different controllers

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimum Lua with different controllers

Rahul
Hi All,

Happy new year to All!

Well, I am not sure if this has been discussed but I have following situation :

A multi-processor system which is being controlled (or hosted) by either ARM core , STM32 or PIC32 which will be connected to PC. I have been asked to provideĀ 
scripting facility for each of the controller.

I am planning to just run Lua-VM on the micro-controllers and from PC send Lua chunk. then i can keep my script interface same for everyone. I am able to think of benefits in terms of common scripting interface and memory, will there be any limitation which i am not able to think right now?

Is there any repo which has only Minimum Lua available ( no parser , only VM)?

P.S. - For some reason I can not use eLua.

-
Rahul
Reply | Threaded
Open this post in threaded view
|

Re: Minimum Lua with different controllers

dyngeccetor8
On 01/13/2018 06:57 PM, RAHUL KUMAR wrote:
> Is there any repo which has only Minimum Lua available ( no parser , only
> VM)?
> [...]
> -
> Rahul

? https://github.com/LuaDist/lua/blob/lua-5.1/etc/min.c

-- Martin

Reply | Threaded
Open this post in threaded view
|

Re: Minimum Lua with different controllers

Luiz Henrique de Figueiredo
In reply to this post by Rahul
> Is there any repo which has only Minimum Lua available (no parser, only VM)?

See http://www.lua.org/extras/5.3/noparser.c

Reply | Threaded
Open this post in threaded view
|

[PATCH] Without Parser (Was: Minimum Lua with different controllers)

Paige DePol
Luiz Henrique de Figueiredo <[hidden email]> wrote:
> On 01/13/2018 06:57 PM, RAHUL KUMAR wrote:
>> Is there any repo which has only Minimum Lua available (no parser, only VM)?
>
> See http://www.lua.org/extras/5.3/noparser.c

I created an itty-bitty tiny patch which essentially does the same
as noparser.c but via -DLUA_NO_PARSER instead of via an object file.
This patch also supports -DLUA_NO_DUMP and -DLUA_NO_UNDUMP as well.

Under Lua 5.3.4 I see a 15.5% reduction[1] in the 'lua' binary when
both -DLUA_NO_PARSER and -DLUA_NO_DUMP are specified.

I just thought I would share this mini-patch in case others found it
easier to control these modules via compiler defines as well.

I am once again working on my patch site, sadly I missed my year-end
deadline due to a pretty terrible December. We are still recovering,
however, I am once again able to devote more time to Lua hacking!

~Paige

[1] From 228.2k down to 192.8k (compiled under macOS 10.11.6)


without-parser.patch (5K) Download Attachment