gopher-lua
gopher-lua copied to clipboard
Binding to shared object (running a C function)
trafficstars
Is it possible to run C functions? Like how in Lua or LuaJit you have the ffi library?
See https://github.com/yuin/gopher-lua/issues/256 You can only run pure Lua Code. Lua Modules which load C libraries do not work.
If you want to use C functions with gopher-lua you have to write a wrapper in Go around the C library and then expose that wrapper to lua. I'm not aware of any Go FFI library for usage with gopher-lua