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
- Host: GitHub
- URL: https://github.com/ousttrue/luajitffi
- Owner: ousttrue
- License: mit
- Created: 2021-07-18T09:35:20.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-04T09:16:14.000Z (almost 5 years ago)
- Last Synced: 2026-01-01T10:41:32.292Z (6 months ago)
- Language: Lua
- Size: 383 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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}
```