{"repo":"koreader/ffi-cdecl","free":true,"listed":false,"github":"https://github.com/koreader/ffi-cdecl","clone":"git clone https://github.com/koreader/ffi-cdecl.git","description":"Automated C declaration extraction for FFI interfaces","language":"Lua","stars":21,"topics":["luajit-ffi","automation","gcc-plugin"],"license":null,"category":"workflow-automation","readme_excerpt":"ffi-cdecl ========= Automated C declarations extraction tool for FFI interfaces. Currently it generates lua header files for LuaJIT FFI, And python header files for cffi. Dependencies ------------ Development headers for the toolchain on which you plan to use the plugin. gcc-plugin (gcc-x.x-plugin-dev package on ubuntu/debian) Any Lua implementation compatible with Lua 5.1. Building -------- First fetch third party dependencies using git submodule init and git submodule update . Then just type make to build. The default setup builds the plugin for an arm-none-linux-gnueabi toolchain located in /opt/arm-2012.03 , just like the default settings used by the koreader nightly build scripts. However, the Makefile should autodetect and adapt to any toolchain given the CROSS DIR or GCCPLUGIN DIR and the CHOST or CROSSCC / CROSSCXX variables. For example, if you are running an Ubuntu or Debian system and install the gcc-4.7-plugin-dev package, you can build a plugin for you standard gcc executable: make CROSS DIR=/usr/lib/gcc CROSSCC=gcc CROSSCXX=g++ Also, if you install gcc-4.7-arm-linux-gnueabi , you can build a plugin which can be used with that toolchain: make CROSS DIR=/usr/lib/gcc CHOST=arm-linux-gnueabi Read the Makefile for more details. Usage ----- See test/ directory and [koreader-base][] for examples. When you have the C file ready, run ffi-cdecl gcc file.c output.lua or ffi-cdecl g++ file.cpp output.lua to generate a Lua file containing a ffi.cdef declaring the desired fun","default_branch":null,"files":null,"tree":[],"storefront":"/r/koreader","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/koreader/ffi-cdecl/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}