Skip to content

Customizing

ruby-bindgen can customize the generated bindings in several ways:

  • symbols: skip: — exclude specific functions, structs, enums, or typedefs by name or regex pattern
  • symbols: overrides: — replace the generated signature for specific functions when the heuristics pick the wrong FFI type
  • export_macros — only include functions marked with specific visibility macros
  • rename_types — override generated Ruby module/class names
  • rename_methods — override generated Ruby method names

Module Name

By default, the generated Ruby module is named after the header file (e.g., proj.hmodule Proj). Use the module option to override this, including nested modules:

module: Proj::Api

This generates properly nested module Proj / module Api with correct indentation.