aboutsummaryrefslogtreecommitdiff
path: root/src/pow_lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pow_lua.c')
-rw-r--r--src/pow_lua.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pow_lua.c b/src/pow_lua.c
new file mode 100644
index 0000000..0d0214d
--- /dev/null
+++ b/src/pow_lua.c
@@ -0,0 +1,16 @@
+#include "pow_lua.h"
+
+#include "lauxlib.h"
+#include "lualib.h"
+
+int pow_lua_hello(lua_State *L) { printf("hi\n"); }
+
+luaL_Reg libpow[] = {{"hello", pow_lua_hello}};
+
+int pow_lua_load(lua_State *L) {
+ luaL_newlib(L, libpow);
+
+ lua_setglobal(L, "pow");
+
+ return 0;
+}