-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support recompile lualib with custom plugin? #1502
Comments
Hello, I'm sadly having some trouble understanding what you are trying to achieve. Would it perhaps be possible for you to send a code snippet explaining it? Or a playground link. Thank you |
Sounds like this is a duplicate of #973, I still think this would be a good idea to do. However, the design is not yet clear to me, and we need to decide on what the interface for this should be. |
Yes this is a duplicate, and sorry I didn't check it. Currently, lualib are already precompiled into lua code and package in the npm package. What I am hoping is, there is an option to choose using precompiled lualib or not, so that the lualib code can be recompiled with user's plugin if user choose not to use precompiled code. Of course, those lualib ts source code should also be published to npm. For example, we have code |
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#
, globalnext
function, globalipairs
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.
The text was updated successfully, but these errors were encountered: