c2ffi4rb

Gem Version test Lines of Code

c2ffi - FFI binding generator - for Ruby

installation

sh gem install c2ffi4rb

Usage

First, produce a spec file using c2ffi.

sh c2ffi -M macros.h -o example.json example.h c2ffi -o macros.json example.h macros.h

Next, use c2ffi4rb to generate ruby code.

sh c2ffi4rb example.json macros.json > simple.rb

Finally, improve simple.rb manually to complete the binding.

Options

sh c2ffi4rb -h # Show help c2ffi4rb -v # Show version c2ffi4rb -t table.tsv file.json macros.json > output.rb # Use type conversion table

Development

To run tests, install c2ffi, Cairo, and pkg-config in advance. Then execute rake test.

Licence