lua-users home
lua-l archive

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


On Wed, Feb 27, 2019 at 6:04 PM Chris Smith <space.dandy@icloud.com> wrote:

> In that case, my first inclination would be to use traditional ‘interface’ semantics: pass a structure to the module on initialisation that contains the Lua state and pointers to the Lua API functions.

This much is clear. Moreover, this can be done with some pre-processor magic so that both the host and loadable libs could be just rebuilt as if against the stock Lua library, with the host ending up linked statically while the libs linking dynamically to the hosted implementation. I have discovered a truly remarkable proof of this theorem which this margin is too small to contain.

Cheers,
V.