Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cooldaemon/erluna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

11 Commits

Repository files navigation

erluna

erluna is Lua bindings for Erlang.

Building from Source

% cd /path/to
% git clone git://github.com/cooldaemon/erluna.git
% cd ./erluna
% make

How to Use

{ok, Lua} = erluna:start(),
ok = Lua:eval("lua_value1 = 1 + 1"),
{ok, 2} = Lua:get("lua_value1"),
ok = Lua:eval("function lua_fun(x) return x * 2 end"),
ok = Lua:eval("lua_value2 = lua_fun(5)"),
{ok, 10} = Lua:get("lua_value2"),
ok = Lua:set("lua_value3", [1, {foo, bar}, 3]),
{ok, [{1, 1}, {2, 3}, {"foo", "bar"}]} = Lua:get("lua_value3"),
ok = Lua:eval_file("/path/to/foo.lua"),
ok = Lua:eval("function echo(a, b) return a, b end"),
{ok, ["foo", "bar"]} = Lua:apply("echo", {foo, "bar"}),
Lua:stop().

About

erluna is Lua bindings for Erlang.

Resources

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /