Skip to content

Instantly share code, notes, and snippets.

@hanxi
Created July 25, 2014 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanxi/f4ae7dabdcb49fa62cac to your computer and use it in GitHub Desktop.
Save hanxi/f4ae7dabdcb49fa62cac to your computer and use it in GitHub Desktop.
-- bare-bones luac in Lua
-- usage: lua luac.lua file.lua file.out
local out=arg[1]..".out"
if arg[2]~=nil then out=arg[2] end
f=assert(io.open(out,"wb"))
assert(f:write(string.dump(assert(loadfile(arg[1])))))
assert(f:close())
@hanxi
Copy link
Author

hanxi commented Jul 25, 2014

bare-bones luac in Lua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment