# fengari 🐺 φεγγάρι - A Lua VM written in JS ES6 targeting the browser ## So far - [x] Parse bytecode - [x] Opcodes - [ ] Basic types representation: - [x] nil - [x] boolean - [x] table - [x] function - [ ] string (8-bit clean) - [ ] number (32-bit ?) - [ ] integer - [ ] float - [ ] userdata - [ ] thread - [ ] Tag Methods - [x] ... - [ ] `__tostring` - [ ] `__pairs` - [ ] C API - [ ] lua_Alloc - [ ] lua_CFunction - [ ] lua_Debug - [ ] lua_Hook - [ ] lua_Integer - [ ] lua_KContext - [ ] lua_KFunction - [ ] lua_Number - [ ] lua_Reader - [ ] lua_State - [ ] lua_Unsigned - [ ] lua_Writer - [ ] lua_absindex - [ ] lua_arith - [ ] lua_atpanic - [ ] lua_call - [ ] lua_callk - [ ] lua_checkstack - [ ] lua_close - [ ] lua_compare - [ ] lua_concat - [ ] lua_copy - [ ] lua_createtable - [ ] lua_dump - [ ] lua_error - [ ] lua_gc - [ ] lua_getallocf - [ ] lua_getextraspace - [ ] lua_getfield - [ ] lua_getglobal - [ ] lua_gethook - [ ] lua_gethookcount - [ ] lua_gethookmask - [ ] lua_geti - [ ] lua_getinfo - [ ] lua_getlocal - [ ] lua_getmetatable - [ ] lua_getstack - [ ] lua_gettable - [ ] lua_gettop - [ ] lua_getupvalue - [ ] lua_getuservalue - [ ] lua_insert - [ ] lua_isboolean - [ ] lua_iscfunction - [ ] lua_isfunction - [ ] lua_isinteger - [ ] lua_islightuserdata - [ ] lua_isnil - [ ] lua_isnone - [ ] lua_isnoneornil - [ ] lua_isnumber - [ ] lua_isstring - [ ] lua_istable - [ ] lua_isthread - [ ] lua_isuserdata - [ ] lua_isyieldable - [ ] lua_len - [ ] lua_load - [ ] lua_newstate - [ ] lua_newtable - [ ] lua_newthread - [ ] lua_newuserdata - [ ] lua_next - [ ] lua_numbertointeger - [ ] lua_pcall - [ ] lua_pcallk - [ ] lua_pop - [ ] lua_pushboolean - [ ] lua_pushcclosure - [ ] lua_pushcfunction - [ ] lua_pushfstring - [ ] lua_pushglobaltable - [ ] lua_pushinteger - [ ] lua_pushlightuserdata - [ ] lua_pushliteral - [ ] lua_pushlstring - [ ] lua_pushnil - [ ] lua_pushnumber - [ ] lua_pushstring - [ ] lua_pushthread - [ ] lua_pushvalue - [ ] lua_pushvfstring - [ ] lua_rawequal - [ ] lua_rawget - [ ] lua_rawgeti - [ ] lua_rawgetp - [ ] lua_rawlen - [ ] lua_rawset - [ ] lua_rawseti - [ ] lua_rawsetp - [ ] lua_register - [ ] lua_remove - [ ] lua_replace - [ ] lua_resume - [ ] lua_rotate - [ ] lua_setallocf - [ ] lua_setfield - [ ] lua_setglobal - [ ] lua_sethook - [ ] lua_seti - [ ] lua_setlocal - [ ] lua_setmetatable - [ ] lua_settable - [ ] lua_settop - [ ] lua_setupvalue - [ ] lua_setuservalue - [ ] lua_status - [ ] lua_stringtonumber - [ ] lua_toboolean - [ ] lua_tocfunction - [ ] lua_tointeger - [ ] lua_tointegerx - [ ] lua_tolstring - [ ] lua_tonumber - [ ] lua_tonumberx - [ ] lua_topointer - [ ] lua_tostring - [ ] lua_tothread - [ ] lua_touserdata - [ ] lua_type - [ ] lua_typename - [ ] lua_upvalueid - [ ] lua_upvalueindex - [ ] lua_upvaluejoin - [ ] lua_version - [ ] lua_xmove - [ ] lua_yield - [ ] lua_yieldk - [ ] Auxiliary library - [ ] Standard library - [ ] Debug (errors) - [ ] DOM API binding - [ ] Parse Lua - [ ] Generate bytecode ## References - [Source code for Lua 5.3](lua.org/source/5.3/) - [Lua 5.2 Bytecode and Virtual Machine](http://files.catwell.info/misc/mirror/lua-5.2-bytecode-vm-dirk-laurie/lua52vm.html) - [Lua 5.3 Bytecode Reference](http://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html) - [A No-Frills Introduction to Lua 5.1 VM Instructions](http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf)