-
Hello. I am looking at this project as a possible alternative for things like Is it possible, for example, to write a neovim plugin with nelua, then transpile it somehow, or compile it and then use that as a plugin? What limitations would I encounter? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Nelua transpiles to C and then to native, it cannot be required by Lua. The only way to use it is to make a binding using the Lua C-API, in this case, isn't any different from the traditional Lua libraries written in C. If you're using LuaJIT, it has a ffi module which, then, yes, you could import nelua code if your nelua code is being exported as a standalone C library: |
Beta Was this translation helpful? Give feedback.
Nelua transpiles to C and then to native, it cannot be required by Lua.
The only way to use it is to make a binding using the Lua C-API, in this case, isn't any different from the traditional Lua libraries written in C.
If you're using LuaJIT, it has a ffi module which, then, yes, you could import nelua code if your nelua code is being exported as a standalone C library:
https://nelua.io/overview/#exporting-named-c-functions