Skip to content

agladysh/browser-lua

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Browser-Lua: Run Lua in Browser

About

Browser-Lua project is an abstract wrapper to several alternative backends that allow to run Lua code in browser.

Browser-Lua allows user to call Lua code from JS and JS code from Lua.

Browser-Lua is still in its embryonic phase of development. More detailed description would be added later.

See the copyright information in the file named COPYRIGHT.

Supported backends

(None so far)

Planned backends

API v1.0

(To be implemented)

JS

  • BrowserLua.init([enabled_backends])

  • BrowserLua.doString(lua_code, [chunkname])

  • BrowserLua.callLua(functionName, args, ...) --> array of return values

  • BrowserLua.provideFile(path, file_contents_string)

  • BrowserLua.doFile(path)

Lua

  • BrowserLua.callJS(functionName, args, ...) --> return value

  • BrowserLua.dofile(filename)

  • BrowserLua.loadfile(filename, chunkname)

  • BrowserLua.initWrapper()

Does the equivalent of this:

getenv().dofile = BrowserLua.dofile
getenv().loadfile = BrowserLua.loadfile

API v2.0

(To be designed and implemented)

  • Data manipulation API just like lua-alchemy sugar.
  • For JS (to manipulate Lua data)
  • For Lua (to manipulate JS data)
  • Modules, native to backend
  • socket module (imitating luasocket.*)

About

Run Lua in Browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published