Hello Julia Community,
I’m excited to announce the release of LuaNova.jl
(inspired by the new moon, or lua nova in Portuguese), a package that simplifies embedding a Lua interpreter in Julia and exposing Julia functions, methods, and structs to Lua.
Key Features:
- Bind Julia Functions to Lua: Expose Julia functions as global Lua functions, with full support for Julia’s multiple dispatch.
- Expose Julia Structs: Bind Julia structs to Lua, enabling them to interact via metamethods.
For detailed usage examples, check the GitHub repository GitHub - raphasampaio/LuaNova.jl: Embed Lua in Julia.
Enjoy integrating Lua and Julia!
27 Likes
Very nice! I will have to give it a try. The syntax of Lua makes it a nice file format.
1 Like
talking to strangers, revisited!
1 Like
Great package! I wonder: would I be able to use this package as a base to generate Documenter.jl documentations for my NeoVim projects? i.e. can I use it to inspect the defined Lua methods of a package and associated comments from Julia?
1 Like
Thank you @klafyvel!
Short answer: partly yes, you can use LuaNova to require
your NeoVim Lua modules and introspect their exported functions/tables through Lua’s debug
library. That gives you names, arity, and source locations, which is enough to generate API pages for Documenter.jl. What you can’t get directly are comments/docstrings, since Lua doesn’t keep them at runtime, you’d need to reopen the source files and extract the comment blocks yourself.
1 Like