Permalink
Browse files

etc/toluabins: Lua to luabins converter

  • Loading branch information...
1 parent 0d87de3 commit a2a79ccbb91554b38f8d61f6747a2e27590944ab @agladysh committed May 24, 2010
Showing with 16 additions and 0 deletions.
  1. +16 −0 etc/toluabins.lua
View
@@ -0,0 +1,16 @@
+-- Lua to Luabins converter
+
+package.cpath = "./lib/?.so;"..package.cpath
+
+local luabins = require 'luabins'
+
+local filename = select(1, ...)
+assert(filename, "Usage: lua toluabins.lua <out_filename>")
+
+io.write(
+ luabins.save(
+ assert(loadfile(filename))()
+ )
+ )
+
+io:flush()

0 comments on commit a2a79cc

Please sign in to comment.