0.2.0 • Published 1 year ago

lunarbridge v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

lunarbridge

build status npm

Lua 5.4 runtime for JavaScript

Install

$ npm install lunarbridge

Usage

import { LuaRuntime } from "lunarbridge";

const runtime = new LuaRuntime();
runtime.executeScript(`
    function fib(n)
        a = 1
        b = 1
        for i = 1, n do
            t = a + b
            a = b
            b = t
        end
        return a
    end
`);

const result = runtime.execute("fib(10)");
console.log(result);

Not implemented (yet!!)

  • Some metamethods (__index, __newindex, __call)
  • Attributes (<const>, <>)
  • Coroutines
  • Goto
  • The standard library
0.2.0

1 year ago

0.1.0

1 year ago