Lua Colony is wicked slow. It abuses the debug library heavily to emulate JavaScript semantics. Sacrificing speed, you get an embeddable JavaScript engine in ANSI C. Just be aware, Lua Colony may not play nice with Lua's ecosystem, so it should not be considered a way to write Lua code.

Lua Colony compiles to Lua source code, but may not play nice with Lua's ecosystem. Be aware of these caveats:

require(...) works the same as in Lua.

JavaScript methods compiled to Lua require a this argument as the first parameter.

Lua functions which call JavaScript function should pass a this object (which may be nil) as the first parameter.

Inversely, JavaScript calling Lua must pass the first argument as the this parameter; the most logical way to do this is using the .call() method: func.call(arg0, arg1, arg2)

object.method(arg0, arg1) in JavaScript maps to object:method(arg0, arg1) in Lua.

Arrays in JavaScript are indexed from 0, and Lua arrays are indexed from 1. Make sure to either push a dummy element using .shift() when calling Lua from JavaScript, and to explicitly assign the first array element in Lua to the 0 index (eg. in Lua: {[0]='first element', 'second element', 'third...'})

Colony uses the debug library to replace the intrinsic metatables of functions, strings, booleans, and numbers. Functions, booleans, and numbers in Lua have no metatables by default, so this will only cause issues for string metatables, which is replaced entirely. The workaround is to ensure all included code explicitly calls the methods of the string object (eg. string.len("apples") vs ("apples"):len()).