开发者

Calling C function from lua

开发者 https://www.devze.com 2023-04-10 12:28 出处:网络
Can someone tell me is it p开发者_开发技巧ossible 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 luaf

Can someone tell me is it p开发者_开发技巧ossible 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.)


Or the Alien library.

0

精彩评论

暂无评论...
验证码 换一张
取 消