Skip to content

Placebo27/go-gir

This branch is 2 commits behind linuxdeepin/go-gir:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b60cd1a · Apr 13, 2023
Nov 18, 2022
Mar 29, 2023
Mar 31, 2023
Sep 15, 2022
Jun 21, 2022
Apr 13, 2023
Nov 24, 2013
Apr 13, 2023
Mar 31, 2023
Mar 31, 2023
Mar 31, 2023
Mar 31, 2023
Mar 31, 2023
Nov 26, 2021
Sep 15, 2022
May 9, 2019
Dec 14, 2015
Apr 7, 2023
Sep 26, 2022
Sep 26, 2022
Mar 31, 2023
Mar 31, 2023
Mar 31, 2023

Repository files navigation

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 and the original author nsf.

Dependencies

Build dependencies

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

Runtime dependencies

  • gobject-introspection-1.0

Installation

Install prerequisites

$ sudo 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

Getting involved

We encourage you to report issues and contribute changes

License

go-gir-generator is licensed under GPL-3.0-or-later.

About

Formerly go-gir-generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 66.8%
  • C 33.0%
  • Other 0.2%