An open API service indexing awesome lists of open source software.

https://github.com/ousttrue/luajitffi

ffi generator using libclang
https://github.com/ousttrue/luajitffi

Last synced: about 2 months ago
JSON representation

ffi generator using libclang

Awesome Lists containing this project

README

          

# LuajitFFI
luajit FFI generator using libclang

## ToDo

* [x] refactoring traverse
* [x] lfs alternative and luarocks to luajit
* [x] fix set_type
* [x] imgui(c++ mangle)
* [ ] automation [FFI Callbacks with pass by value structs](http://wiki.luajit.org/FFI-Callbacks-with-pass-by-value-structs)
* [x] struct: automation nested type order
* [ ] struct: EmmyLua annotation @field
* [x] struct: ImVector
* [x] cdef require order
* [x] function: default argument
* [x] function: overload. same name has suffix
* [ ] function: description from comment
* [x] function: is variadic(...)
* [x] method
* [x] method: overload
* [x] enum: remove prefix
* [ ] com: example
* [ ] separate annotation

## Setup

```
> cd LuaJIT/src
> cmd /K "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
VC> msvcbuild.bat
```
## Usage

* require PATH environment variable to `libclang.dll`

```
lua main.lua
-I{Include_dir} #CFLAGS
-D{Definition} #CFLAGS
-E{Export_header},{dll_name.dll}
-O{Out_dir}
```