Skip to content

dlee/ffickle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FFIckle - Ruby FFI generator

Want to C libraries in Ruby? That's FFIckle.

FFIckle takes your C headers and turns them into FFI Ruby code so you don't
have to translate C into FFI yourself.

Example:
    require 'ffickle'
    lib = FFIckle::Library.new('libgphoto2',
                               '/usr/local/include/gphoto2/gphoto2-version.h')
    ffi = lib.to_ffi
    puts ffi
    eval ffi

    pointer = Libgphoto2.gp_library_version 1
    puts pointer.read_pointer.read_string

TODO:
* Add enum, struct, union
* Support for arrays
* Add tests

About

Ruby FFI generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages