1local function
build(src_in, bin_out)
2 local src_file = io.open(src_in,
'r')
5 return false,
'file not found: '..src_in
8 local content = src_file:read(
'*a')
9 local bytecode1 = loadstring and loadstring(content) or
load(content)
10 local bytecode2 =
string.
dump(bytecode1, true)
13 local bin_file = io.open(bin_out, 'wb')
14 bin_file:write(bytecode2)