Lunar.Library behaviour (Lunar v1.0.2)

Defines a library that will extend the Lua runtime.

## Example usage

defmodule MyLibrary do
  use Lunar.Library, scope: "my_library"

  deflua hello(name) do
    "Hello, #{name}!"
  end
end

In our Lua code, we can now call my_library.hello("Robert") and get back "Hello, Robert!".

Summary

Types

@type t() :: Lunar.Library

Callbacks

@callback install(tuple()) :: tuple()
@callback scope() :: String.t()
@callback table() :: [tuple()]

Functions

Link to this macro

deflua(call, list)

(macro)