Glua, a Full-Featured Lua VM for Nodejs and the Browser

Datetime:2017-04-11 05:29:23         Topic: Node.js  Lua          Share        Original >>
Here to See The Original Article!!!


glua is what happens when you compile , a Lua VM written in Go, to Javascript. It works right now and you can use it for most awesomeness. You don't have to know Go or even click on the link above, just use this library in your favorite JS environment.


const glua = require('glua')`
  print(12, 'lala', true)
`) // will print these values

var result

  diff: function (a, b) {
    return Math.abs(Math.abs(b) - Math.abs(a))
  saveResult: function (value) {
    result = value
}, `
  local a = 23
  local b = 74
  local difference = diff(a, b)

console.log('the result is: ', result)

try it now

Visit and use your console.