Home

Awesome

Library goluago aims to become a port of Lua 5.1 interpreter to Go Language Toolchain (first 8c/6c/5c, ultimately maybe pure Go).

The library is at early stage of development (not feature complete / not ready for production use), but some important goals were already completed successfully:

STATUS

C API: ~57% complete (81/142 + 1), ~15% have some test (21/143)

Alpha2 (2014-05-15):

What works - new in alpha1 (2013-12-30):

What works since pre-alpha preview 2:

What works since pre-alpha preview 1:

Build & Testsuite Status: Build & Testsuite Status

See also: Build & Testsuite Status on Travis-CI. Please note, that the project is still officially at early stage of development, so if the testsuite fails, it's nothing unexpected; rather, it's very good news that it builds and big part of the testsuite does already succeed!

WANTED / PLANS

Crucial:

Would be nice-ies:

NOTE: you're welcome to contribute anything if you fancy, and not necessarily from this list. The points above are mostly ideas as to what I believe would be most useful at this moment.

BACKGROUND INFO

Lua?

http://lua.org

Lua is a nice scripting language. Small, written in ANSI C, highly portable, reportedly fast. Especially popular among computer games producers, but not only. Easily embeddable (one of its core goals), mature (Lua 1.0 ~ 1993, many applications worldwide since then). MIT-style licensed.

Go Language?

http://golang.org

Fairly new language developed at Google. Authors are however experienced in building and experimenting with programming languages (specifically C, Limbo), with notable uses, including OS development (Unix, Plan9/Inferno). Highly portable (x86/x64, ARM; Linux/*nix, Windows, Mac OS X, other ports in progress), written (bootstrapped) in C. BSD-style licensed. Popularity hard to determine given short time on market, but has several nice and interesting features and properties.

INSTALLATION

With the Go environment properly set up, type:

go get github.com/akavel/goluago/internal
go test github.com/akavel/goluago/internal

To retrieve and run a sample program:

go get github.com/akavel/goluago/testlua
cd $GOROOT   # or, see $GOPATH; on Windows %GOROOT%, %GOPATH%
bin/testlua  # on Windows: bin\testlua.exe
<a name="C-API-STATUS"/> C API STATUS ------------

~57% complete (81/142 + 1), ~15% have some test (21/143)

GoCtests?
luaL_addchar
luaL_addlstring
luaL_addsize
luaL_addstring
luaL_addvalue
luaL_argcheck
luaL_argerror
luaL_buffinit
luaL_callmeta
luaL_checkany
luaL_checkint
luaL_checkinteger
luaL_checklong
luaL_checklstring
luaL_checknumber
luaL_checkoption
luaL_checkstack
luaL_checkstring
luaL_checktype
luaL_checkudata
luaL_dofile
luaL_dostring
luaL_error
luaL_getmetafield
luaL_getmetatable
luaL_gsub
State.LoadbufferluaL_loadbufferhas test!
luaL_loadfile
luaL_loadstring
luaL_newmetatable
OpenluaL_newstatehas test!
State.LOpenlibsluaL_openlibs
luaL_optint
luaL_optinteger
luaL_optlong
State.LOptstringluaL_optlstring
State.LOptnumberluaL_optnumber
State.LOptstringluaL_optstring
luaL_prepbuffer
luaL_pushresult
State.LRefluaL_ref
luaL_register
luaL_typename
luaL_typerror
State.LUnrefluaL_unref
State.LWhereluaL_where
lua_atpanic
State.Calllua_callhas test!
State.Checkstacklua_checkstack
State.Closelua_closehas test!
State.Concatlua_concat
State.Gopcalllua_cpcall
State.Createtablelua_createtable
State.Dumplua_dump
State.Equallua_equalhas test!
State.Errorlua_error
State.Gclua_gc
lua_getallocf
State.Getfenvlua_getfenv
State.Getfieldlua_getfieldhas test!
State.Getgloballua_getglobalhas test!
lua_gethook
lua_gethookcount
lua_gethookmask
lua_getinfo
lua_getlocal
State.Getmetatablelua_getmetatable
lua_getstack
State.Gettablelua_gettable
State.Gettoplua_gettophas test!
State.Getupvaluelua_getupvaluehas test!
State.Insertlua_insert
State.Isbooleanlua_isboolean
State.Iscfunctionlua_iscfunction
State.Isfunctionlua_isfunction
State.Islightuserdatalua_islightuserdata
State.Isnillua_isnil
State.Isnonelua_isnone
State.Isnoneornillua_isnoneornil
State.Isnumberlua_isnumber
State.Isstringlua_isstring
State.Istablelua_istable
State.Isthreadlua_isthread
State.Isuserdatalua_isuserdata
State.Lessthanlua_lessthan
State.Loadlua_loadhas test!
lua_newstate
State.Newtablelua_newtable
lua_newthread
lua_newuserdata
State.Nextlua_next
State.Objlenlua_objlen
State.Pcalllua_pcall
State.Poplua_pop
State.Pushbooleanlua_pushboolean
State.Pushgofunctionlua_pushcclosurehas test!
State.Pushgofunctionlua_pushcfunctionhas test!
lua_pushfstring
State.Pushgofunctionlua_pushgofunctionhas test!
State.Pushintegerlua_pushintegerhas test!
State.Pushlightuserdatalua_pushlightuserdata
State.Pushstringlua_pushliteralhas test!
State.Pushstringlua_pushlstringhas test!
State.Pushnillua_pushnil
State.Pushnumberlua_pushnumber
State.Pushstringlua_pushstringhas test!
lua_pushthread
State.Pushvaluelua_pushvalue
lua_pushvfstring
State.Rawequallua_rawequal
State.Rawgetlua_rawget
State.Rawgetilua_rawgeti
State.Rawsetlua_rawset
State.Rawsetilua_rawseti
State.Registerlua_register
State.Removelua_remove
State.Replacelua_replace
lua_resume
lua_setallocf
State.Setfenvlua_setfenv
State.Setfieldlua_setfield
State.Setgloballua_setglobal
lua_sethook
lua_setlocal
State.Setmetatablelua_setmetatablehas test!
State.Settablelua_settable
State.Settoplua_settop
lua_setupvalue
State.Statuslua_status
State.Tobooleanlua_toboolean
lua_tocfunction
State.Tointegerlua_tointegerhas test!
State.Tostringlua_tolstringhas test!
State.Tonumberlua_tonumber
lua_topointer
State.Tostringlua_tostringhas test!
lua_tothread
State.Touserdatalua_touserdata
State.Typelua_type
State.Typenamelua_typename
Upvalueindexlua_upvalueindex
lua_xmove
lua_yield

LICENSE

Where not otherwise specified, MIT-licensed as:

Copyright (c) 2011-2014 Mateusz Czapliński

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Lua code MIT-licensed as:

Copyright (C) 1994-2008 Lua.org, PUC-Rio. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.