{"id":16612826,"url":"https://github.com/neelance/ffi_gen","last_synced_at":"2025-04-05T23:08:44.362Z","repository":{"id":2575856,"uuid":"3556352","full_name":"neelance/ffi_gen","owner":"neelance","description":"A generator for Ruby FFI bindings, directly from header files via LLVM's Clang compiler","archived":false,"fork":false,"pushed_at":"2023-04-08T05:37:28.000Z","size":3968,"stargazers_count":88,"open_issues_count":14,"forks_count":26,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T22:06:23.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neelance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-02-27T01:28:48.000Z","updated_at":"2024-05-31T02:14:57.000Z","dependencies_parsed_at":"2023-07-05T17:00:21.609Z","dependency_job_id":null,"html_url":"https://github.com/neelance/ffi_gen","commit_stats":{"total_commits":153,"total_committers":6,"mean_commits":25.5,"dds":"0.13725490196078427","last_synced_commit":"48a2e4c38926a6a3e0cdc4b89ac7430abbaffaf2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neelance%2Fffi_gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neelance%2Fffi_gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neelance%2Fffi_gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neelance%2Fffi_gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neelance","download_url":"https://codeload.github.com/neelance/ffi_gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T01:43:48.826Z","updated_at":"2025-04-05T23:08:44.344Z","avatar_url":"https://github.com/neelance.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# A generator for Ruby FFI bindings\n\n*Author:* Richard Musiol\n*Contributors:* Jeremy Voorhis (thanks for the initial idea)\n*License:* MIT (see LICENSE)\n\n\n## Features\n\n* Generation of FFI methods, structures, unions, enumerations and callbacks\n* Generation of YARD documentation comments\n* Tested with headers of the following libraries:\n  * Cairo\n  * CEF (Chromium Embedded Framework)\n  * Clang\n  * LibSSH2\n  * LLVM\n  * OpenGL\n  * SQLite3\n\n\n## Requirements\n\n* Ruby 1.9\n* Clang 3.5 or later ([Download](http://llvm.org/releases/download.html#3.5) the binaries or\n  build from source configured with ``--enable-shared``)\n\n*These requirements are only for running the generator. The generated files are Ruby 1.8 compatible and do not need Clang.*\n\n\n## Example\n\nUse the following interface in a script or Rake task:\n\n```ruby\nrequire \"ffi_gen\"\n\nFFIGen.generate(\n  module_name: \"Clang\",\n  ffi_lib:     \"clang\",\n  headers:     [\"clang-c/Index.h\"],\n  cflags:      `llvm-config --cflags`.split(\" \"),\n  prefixes:    [\"clang_\", \"CX\"],\n  output:      \"clang-c/index.rb\"\n)\n```\n\nOutput: [clang-c/index.rb](https://github.com/neelance/ffi_gen/blob/master/test/output/clang-c/Index.rb)\n\nOther generated files can be found in the [test/output](https://github.com/neelance/ffi_gen/tree/master/test/output) directory.\n\n\n## Hints\n\nYou may need to set additional include directories:\n\n```\nexport CPATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/include\n```\n\nYour GCC include paths can be seen with:\n\n```\n`gcc -print-prog-name=cc1` -v\n```\n\n\n## Projects using ffi_gen\n\n* https://github.com/jvoorhis/ruby-llvm\n\n\n## Roadmap\n\n* Support for more libraries:\n  * (Write me if you have a whish)\n* Automatic generation of object oriented wrappers\n* Polish YARD documentation comments some more\n\n\n## Feedback\n\nPlease use GitHub's issue tracker for problems or suggestions. Pull requests are welcome, too.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneelance%2Fffi_gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneelance%2Fffi_gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneelance%2Fffi_gen/lists"}