Skip to content

Instantly share code, notes, and snippets.

local ffi = require("ffi")
local lua = require("luajit")
local sdl = require("SDL2")
local message_type = "struct {uint8_t*to_ptr; size_t to_len; uint8_t*from_ptr; size_t from_len;} *"
local state = lua.L.newstate()
lua.L.openlibs(state)
local ok = lua.L.loadstring(state, [[