[ANN] - LJIT2libc - LuaJIT binding to libc

  • From: William Adams <william_a_adams@xxxxxxxxxxx>
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Sat, 29 Aug 2015 20:12:48 +0000


https://github.com/Wiladams/LJIT2libc

The README in the project itself gives the justification for the project, so
here it is:

Why a binding to libc?
Because I keep pulling in things from libc, sprinkling those ffi.cdefs
all over my various projects. This one is meant to be the gethering
place for all things libc.


Whether it be test code, porting code, or whatever, I often find myself with C
code that I want to convert to Lua.  Well, aside from the obvious languages
issues, there are the various libc headers that are brought in along the way. 
This binding is an evolving set of ffi calls, which strive to provide a fairly
safe environment to the Lua programmer.

I am borrowing from my own projects, ljsyscall, libuv, musl, gnu;  Basically
just trying to nail any platform or compiler idoms, determining which are ok to
stay, and which need to go.

At any rate, the style is similar to the various other bindings I've done
recently.    Given the lua GC, and access to all the libc functions, the code
begins to look like straight forward C, with a "wrapped in LuaJIT goodness"
sticker on it.
 
===============================
- Shaping clay is easier than digging it out of the ground.

Other related posts:

  • » [ANN] - LJIT2libc - LuaJIT binding to libc - William Adams