lunarbridge
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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

Package Sidebar

Install

npm i lunarbridge

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

190 kB

Total Files

45

Last publish

Collaborators

  • forestbelton