File: README.md

package info (click to toggle)
go-gir-generator 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,216 kB
  • sloc: ansic: 186; makefile: 44
file content (69 lines) | stat: -rw-r--r-- 2,017 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# go-gir-generator

## Description

Project go-gir-generator implements GObject-introspection based bindings generator for Go.

There are many Go bindings of GObject/Gtk libraries out there, but almost all of them are written by hand. It's boring and error-prone since the corresponding C library may change very often. go-gir-generator can adapt to the newest version of GObject without changing one single line of code, which makes it less painful to write Go code with GObject.

*NOTE: Currently it only supports GObject-2.0, Glib-2.0, Gio-2.0, support of Gdk/Gtk is not completed.*


Many thanks to the genius guys who created the [GObject Introspection](https://wiki.gnome.org/action/show/Projects/GObjectIntrospection) and the original author [nsf](https://github.com/nsf/gogobject).

## Dependencies

### Build dependencies

- golang 1.3 above
- pkg-config
- gobject-introspection-1.0

### Runtime dependencies

- gobject-introspection-1.0

## Installation

Install prerequisites

```
$ apt-get install libgirepository1.0-dev libgudev-1.0-dev
$ make install
```

## Usage

The binary program gir-generator is the static binding
code generator.
It read the GIRepository and template files from lib.in directory.

For example, we need generate gobject-2.0 binding,

```
cd lib.in/gobject-2.0
gir-generator -o . gobject.go.in
```

Note: deepin generate all bindings under $GOPATH/src/gir/$PackageName

## Getting help

Any usage issues can ask for help via

* [Gitter](https://gitter.im/orgs/linuxdeepin/rooms)
* [IRC channel](https://webchat.freenode.net/?channels=deepin)
* [Forum](https://bbs.deepin.org)
* [WiKi](http://wiki.deepin.org/)

## Getting involved

We encourage you to report issues and contribute changes

* [Contribution guide for users](http://wiki.deepin.org/index.php?title=Contribution_Guidelines_for_Users)
* [Contribution guide for developers](http://wiki.deepin.org/index.php?title=Contribution_Guidelines_for_Developers)

## License

go-gir-generator is licensed under [GPLv3](LICENSE).