$ luarocks install lua-resty-ffi
With lua-resty-ffi, You could develop openresty libraries in mainstream languages (Go, Python, Java, Rust, Node.js).
Features:
* nonblocking, in coroutine way
* simple but extensible interface, supports any C ABI compliant language
* once and for all, no need to write C/Lua codes to do coupling anymore
* high performance, faster than unix domain socket way
* generic loader library for python/java/nodejs
* any serialization message format you like
### How to build lua-resty-ffi .so file?
# specify your openresty source path in variable $OR_SRC ensure openresty source are already configured and built according to your product release
luarocks config variables.OR_SRC /tmp/tmp.Z2UhJbO1Si/openresty-1.21.4.1
# Because non-code changes can also affect buildid generation, specifying the real running nginx binary (optional) can solve this problem.
luarocks config variables.NGINX_BIN /usr/local/openresty/nginx/sbin/nginx
luarocks install lua-resty-ffi