Skip to content

Using nelua from lua #266

Answered by Andre-LA
Dich0tomy asked this question in Q&A
Jun 26, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Dich0tomy
Comment options

@Andre-LA
Comment options

Answer selected by Dich0tomy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants