Binding to shared object (running a C function) #422
Answered
by
Simerax
LevitatingBusinessMan
asked this question in
Q&A
-
Is it possible to run C functions? Like how in Lua or LuaJit you have the |
Beta Was this translation helpful? Give feedback.
Answered by
Simerax
Mar 10, 2021
Replies: 1 comment
-
See #256 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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LevitatingBusinessMan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See #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