Skip to content

Support recompile lualib with custom plugin? #1502

@pilaoda

Description

@pilaoda

Here is the case, I want to implement a proxy for array in luajit environment with __index and __newindex that read write data in another table.
However, luajit which is lua5.1 doesn't support __len __ipair metamethod, and length operator #, global next function, global ipairs function would return wrong result on proxy.

Then I come up with an idea that write a printer plugin that print # next ipairs into some custom implementation, but this plugin would ignore code in lualib.

I think the problem is, the plugin doesn't give user enough power to modify the compilation process, since lualib are already compiled before plugin taking over.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions