Can someone tell me is it possible to somehow call c function or simply wrap it into a lua function WITHOUT building a new module.
If it works for you, try the FFI library. See also luaffi.
Lua can't call arbitrary C functions - they have to be bound to something in the Lua namespace first. (This is intentional to prevent breaking out of sandboxes in embedded applications.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With