I wanted to announce the stable release of a project started at TV Labs, called Lua.
Features
~LUA sigil for validating Lua code at compile-time
deflua macro for exposing Elixir functions to Lua
Improved error messages and sandboxing
Deep setting/getting variables and state
Excellent documentation and guides for working with Luerl
Lua the Elixir library vs Lua the language {: .info}
When referring to this library, Lua will be stylized as a link.
References to Lua the language will be in plaintext and not linked.
From the blog post
The first stable release of the Elixir library, Lua v0.1.0, has been released to hex.pm!
Lua is a library that allows you to execute arbitrary, sandboxed Lua programs directly on the BEAM VM. This is not embedding the C Lua runtime and compiler, but rather a complete implementation of Lua 5.3. This feat is made possible by the underlying Luerl library, which implements a Lua parser, compiler, and runtime, all in Erlang.
The Lua Elixir library extends the capabilities of the Luerl library, improving error messages and providing robust documentation.
Any data returned from a deflua function, or a function set by Lua.set!/3 is now validated. If the data is not an identity value, or an encoded value, it will raise an exception. In the past, Lua and Luerl would happily accept bad values, causing downstream problems in the program. This led to unexpected behavior, where depending on if the data passed was decoded or not, the program would succeed or fail