ffi = require("ffi") ffi.cdef[[ int init_dpath(const char *conf); uint8_t *get_dpath(const uint8_t *uri); ]] dpath = ffi.load('diskdisp'); init = dpath.init_dpath("/usr/local/openresty/nginx/conf/dpath"); if init ~= 0 then os.exit(1); end