Arrow GLib is a wrapper library for Arrow C++. Arrow GLib provides C API.
Arrow GLib supports GObject Introspection. It means that you can create language bindings at runtime or compile time.
For example, you can use Apache Arrow from Ruby by Arrow GLib and gobject-introspection gem with the following code:
# Generate bindings at runtime
require "gi"
Arrow = GI.load("Arrow")
# Now, you can access arrow::BooleanArray in Arrow C++ by
# Arrow::BooleanArray
p Arrow::BooleanArray
In Ruby case, you should use red-arrow gem. It's based on gobject-introspection gem. It adds many convenient features to raw gobject-introspection gem based bindings.
TODO
You need to install Arrow C++ before you install Arrow GLib. See Arrow C++ document about how to install Arrow C++.
You need GTK-Doc and GObject Introspection to build Arrow GLib. You can install them by the followings:
On Debian GNU/Linux or Ubuntu:
% sudo apt install -y -V gtk-doc-tools libgirepository1.0-dev
On CentOS 7 or later:
% sudo yum install -y gtk-doc gobject-introspection-devel
On macOS with Homebrew:
% brew install -y gtk-doc gobject-introspection
Now, you can build Arrow GLib:
% cd glib
% ./configure --enable-gtk-doc
% make
% sudo make install
You can use Arrow GLib with C or other languages. If you use Arrow GLib with C, you use C API. If you use Arrow GLib with other languages, you use GObject Introspection based bindings.
You can find API reference in the
/usr/local/share/gtk-doc/html/arrow-glib/
directory. If you specify
--prefix
to configure
, the directory will be different.
You can find example codes in the example/
directory.
You can use Arrow GLib with non C languages with GObject Introspection based bindings. Here are languages that support GObject Introspection:
-
Ruby: red-arrow gem should be used.
-
Python: PyGObject should be used. (Note that you should use PyArrow than Arrow GLib.)
-
Lua: LGI should be used.
-
Go: Go-gir-generator should be used.
See also Projects/GObjectIntrospection/Users - GNOME Wiki! for other languages.