forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See also https://issues.apache.org/jira/browse/ARROW-631 and `glib/README.md` in this change. Author: Kouhei Sutou <[email protected]> Closes apache#382 from kou/glib-import and squashes the following commits: 67a5d24 [Kouhei Sutou] [GLib] Rename directory to c_glib/ from glib/ 24cd605 [Kouhei Sutou] [GLib] Import
- Loading branch information
Showing
246 changed files
with
18,251 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Makefile | ||
Makefile.in | ||
.deps/ | ||
.libs/ | ||
*.gir | ||
*.typelib | ||
*.o | ||
*.lo | ||
*.la | ||
*~ | ||
/*.tar.gz | ||
/aclocal.m4 | ||
/autom4te.cache/ | ||
/config.h | ||
/config.h.in | ||
/config.log | ||
/config.status | ||
/config/ | ||
/configure | ||
/doc/reference/*.txt | ||
/doc/reference/*.txt.bak | ||
/doc/reference/*.args | ||
/doc/reference/*.hierarchy | ||
/doc/reference/*.interfaces | ||
/doc/reference/*.prerequisites | ||
/doc/reference/*.signals | ||
/doc/reference/*.types | ||
/doc/reference/gtk-doc.make | ||
/doc/reference/*.stamp | ||
/doc/reference/html/ | ||
/doc/reference/xml/ | ||
/libtool | ||
/m4/ | ||
/stamp-h1 | ||
/version | ||
/arrow-glib/enums.c | ||
/arrow-glib/enums.h | ||
/arrow-glib/io-enums.c | ||
/arrow-glib/io-enums.h | ||
/arrow-glib/ipc-enums.c | ||
/arrow-glib/ipc-enums.h | ||
/arrow-glib/stamp-* | ||
/arrow-glib/*.pc | ||
/example/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} | ||
|
||
SUBDIRS = \ | ||
arrow-glib \ | ||
doc \ | ||
example | ||
|
||
EXTRA_DIST = \ | ||
version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<!--- | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. See accompanying LICENSE file. | ||
--> | ||
|
||
# Arrow GLib | ||
|
||
Arrow GLib is a wrapper library for Arrow C++. Arrow GLib provides C | ||
API. | ||
|
||
Arrow GLib supports | ||
[GObject Introspection](https://wiki.gnome.org/action/show/Projects/GObjectIntrospection). | ||
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](https://rubygems.org/gems/gobject-introspection) | ||
with the following code: | ||
|
||
```ruby | ||
# 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](https://rubygems.org/gems/red-arrow). It's based on | ||
gobject-introspection gem. It adds many convenient features to raw | ||
gobject-introspection gem based bindings. | ||
|
||
## Install | ||
|
||
### Package | ||
|
||
TODO | ||
|
||
### Build | ||
|
||
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](https://www.gtk.org/gtk-doc/) and | ||
[GObject Introspection](https://wiki.gnome.org/action/show/Projects/GObjectIntrospection) | ||
to build Arrow GLib. You can install them by the followings: | ||
|
||
On Debian GNU/Linux or Ubuntu: | ||
|
||
```text | ||
% sudo apt install -y -V gtk-doc-tools libgirepository1.0-dev | ||
``` | ||
|
||
On CentOS 7 or later: | ||
|
||
```text | ||
% sudo yum install -y gtk-doc gobject-introspection-devel | ||
``` | ||
|
||
On macOS with [Homebrew](https://brew.sh/): | ||
|
||
```text | ||
% brew install -y gtk-doc gobject-introspection | ||
``` | ||
|
||
Now, you can build Arrow GLib: | ||
|
||
```text | ||
% cd glib | ||
% ./configure --enable-gtk-doc | ||
% make | ||
% sudo make install | ||
``` | ||
|
||
## Usage | ||
|
||
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. | ||
|
||
### C | ||
|
||
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. | ||
|
||
### Language bindings | ||
|
||
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](https://rubygems.org/gems/red-arrow) should be used. | ||
|
||
* Python: [PyGObject](https://wiki.gnome.org/Projects/PyGObject) should be used. (Note that you should use PyArrow than Arrow GLib.) | ||
|
||
* Lua: [LGI](https://github.com/pavouk/lgi) should be used. | ||
|
||
* Go: [Go-gir-generator](https://github.com/linuxdeepin/go-gir-generator) should be used. | ||
|
||
See also | ||
[Projects/GObjectIntrospection/Users - GNOME Wiki!](https://wiki.gnome.org/Projects/GObjectIntrospection/Users) | ||
for other languages. |
Oops, something went wrong.