I think that discussion still generally covers it.
Tom Schouten's reply still covers how you would get Lua without eLua (from the raw Lua sources):
If you're building with Newlib as your libc you'll need to provide your own implementations of calls that would typically be provided by an operating system as described here:
https://sourceware.org/newlib/libc.html#StubsYou can find examples in the eLua sources for Newlib:
https://github.com/elua/elua/blob/master/src/newlib/stubs.cAs mentioned there, going this route will not be the most memory efficient approach since eLua has a number of patches to improve memory performance.
You could also extract eLua's sources and build them into your project but we don't have a simple guide for doing this and you'll have to provide some of the functionality that the build system does.
An older version of one of these patches that would apply to Lua 5.1.x sources can be found here:
https://github.com/jsnyder/lua/tree/lua_tiny_ramYou'll likely also want the Emergency GC patch:
https://github.com/jsnyder/lua/tree/emergency_gcNaN packing might also be of use:
https://github.com/jsnyder/lua/tree/nan_packingAdditionally you could build your sources into eLua as an extension and you can certainly customize it to do something different from start the eLua shell or Lua REPL:
https://github.com/elua/elua/blob/master/src/main.cBest.
-jsnyder