lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>     - we don't want to support the lua standard libraries 

Just don't open them.

>     - we don't support dynamic memory allocation and leave out the garbage collector (so we need a special keyword to alloc all memory at boot time) 

Use your own memory allocator that gets memory from a fixed pool allocated
the first time it is called.

To avoid the garbage collector, you can write stubs for the functions exported
in lgc.h.

>     - we use int32 instead of float as number type

Edit luaconf.h

>     - we don't support the local keyword or variables that were not explicitly allocated at boot time

Edit llex.c and add a space before "local" in luaX_tokens. But that will
put all variables as global variables, which probably use more memory
than local variables...

To forbid creating global variables after boot time, set up a __newindex
metamethod for _G to raise an error.

> what parts of the LUA source distribution would I need to run the VM on the ARM and what can I leave out?

Try leaving out the parser modules by using etc/noparser.c.
--lhf