
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
by Matijs van Zuijlen
Ruby bindings for GNOME using the GObject Introspection Repository.
gir_ffi-gtk
and require gir_ffi-gtk2
or gir_ffi-gtk3
to
load overrides for Gtk2 or Gtk3.require 'gir_ffi'
# Set up the namespace you wish to use
GirFFI.setup :Gio
# Create an object
inet_address = Gio::InetAddress.new_from_string "127.0.0.1"
# Call some methods on the object
inet_address.is_loopback # => true
inet_address.is_multicast # => false
# Call a function in the namespace
Gio.dbus_is_name "foo" # => false
See the documentation for more usage information.
Have a look in the examples/
directory for some simple examples. More
examples can be found in the repositories for
gir_ffi-gtk
and
gir_ffi-gst
.
gem install gir_ffi
GirFFI is supported on CRuby 2.7, 3.0 and 3.1.
You will also need gobject-introspection installed with some introspection data.
Depending on the GIR data, GirFFI needs the actual libraries to be
available under the name ending in plain .so
. If GirFFI complains that it
cannot find the library, try installing development packages for those
libraries.
GirFFI should work with gobject-introspection 1.56.0 and up, and glib 2.56.0 and up.
On Debian and Ubuntu, installing libgirepository-1.0-1
and gir1.2-glib-2.0
should be enough to use GirFFI in your application.
To run the tests, you should additionally install libgirepository1.0-dev
,
gobject-introspection
, libcairo2-dev
, gir1.2-gtop-2.0
, gir1.2-gtk-3.0
,
gir1.2-pango-1.0
, gir1.2-gtksource-3.0
, gir1.2-secret-1
and
gir1.2-gstreamer-1.0
. This should be enough to get rake test
working.
GirFFI has not been tested on Mac OS X or Microsoft Windows. YMMV. Pull requests to support these platforms are welcome.
Sometimes, the GIR data is incorrect, or not detailed enough, and a reasonable binding cannot be created automatically. For these cases, overrides can be defined. The following gems with overrides already exist:
gir_ffi-gtk
: overrides for Gtk+ 2 and 3.gir_ffi-gnome_keyring
: overrides for GnomeKeyringgir_ffi-cairo
: overrides for Cairogir_ffi-pango
: overrides for Pangogir_ffi-tracker
: overrides for Trackergir_ffi-gst
: overrides for GStreamerPlease see CONTRIBUTING.md for contribution guidelines.
The following people have contributed to GirFFI over the years:
Copyright © 2009–2022 Matijs van Zuijlen
GirFFI is free software, distributed under the terms of the GNU Lesser General Public License, version 2.1 or later. See the file COPYING.LIB for more information.
FAQs
Unknown package
We found that gir_ffi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.