[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-zile] Lua FFI progress
From: |
Reuben Thomas |
Subject: |
[Bug-zile] Lua FFI progress |
Date: |
Wed, 4 May 2011 23:39:12 +0100 |
I spent today writing a JSON backend for ctypesgen, which is a
pure-Python ctypes binding generator. It normally generates Python
bindings directly, but I made it output the info it parses out in JSON
form instead (rather than Lua directly, because that's more useful
generally).
I can read this happily into Lua with LuaJSON of course, so the next
step is to write a JSON to LuaFFI (under LuaJIT) binding module. The
reason not just to use LuaFFI is that first, ctypesgen has a better
parser, and secondly, I could also write an alien backend (alien is a
standalone binding to libffi that is rather more primitive than LuaFFI
but doesn't need LuaJIT; indeed, if I can use alien inside LuaJIT I
may go for that first).
This is of course all directed at getting the Lua bindings for C
libraries written in pure Lua, and leaving only the binding to libffi
in C. posix, regex, and, for standard Lua, bit should be trivial;
curses rather less fun (going by the ad hoc Lua bindings written for
LuaFFI by a kind contributor on the Lua list it should be easy, but
lcurses reveals that there are some fairly nasty things to do
internally for a full-strength binding; I want if possible to replace
the existing libraries for other users, not just for Zile).
--
http://rrt.sc3d.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-zile] Lua FFI progress,
Reuben Thomas <=