• This repository has been archived on 08/Jun/2021
  • Stars
    star
    1,263
  • Rank 37,244 (Top 0.8 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!

gtk Build Status Build status Gitter

Project site | Online documentation

Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo.

Building

gtk expects GTK+, GLib and Cairo development files to be installed on your system. See the GTK installation page.

Using

We recommend using crates from crates.io, as demonstrated here.

If you want to track the bleeding edge, use the git dependency instead:

[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk.git" }

Avoid mixing versioned and git crates like this:

# This will not compile
[dependencies]
gdk = "0.2"
gtk = { git = "https://github.com/gtk-rs/gtk.git" }

Documentation

The majority of the documentation is kept in a separate repo due to licensing issues. You can pull it in with cargo:

> cargo build --features embed-lgpl-docs

Changes to those doc-comments should be submitted to the lgpl-docs repo. Avoid including those embedded doc-comments in PRs to this repo.

The opposite feature removes all of those docs regardless of edits:

> cargo build --features purge-lgpl-docs

These features rewrite the crate sources so it's sufficient to enable them once. Omitting them in the following cargo invocations will not undo their effects!

Generate the docs:

> cargo doc --features v3_16

(if the installed GTK+ version is lower than 3.16, adjust the feature name accordingly).

Contribute

Contributor you're welcome!

See the general bindings documentation.

Most of the bindings (src/auto) are generated by gir using this configuration file. After editing Gir.toml the sources can be regenerated with

> make gir

When opening a PR please put the changes to the src/auto directory in a separate commit.

You may also wish to run cargo clippy -- -D warnings and check that you're clean because otherwise you may be surprised when CI fails.

License

gtk is available under the MIT License, please refer to it.

More Repositories

1

gtk4-rs

Rust bindings of GTK 4
Rust
1,792
star
2

gtk3-rs

Rust bindings for GTK 3
Rust
476
star
3

examples

DEPRECATED, use https://github.com/gtk-rs/gtk-rs repository instead!
Rust
284
star
4

gir

Tool to generate rust bindings and user API for glib-based libraries
Rust
209
star
5

gtk-rs-core

Rust bindings for GNOME libraries
Rust
201
star
6

cairo

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
148
star
7

glib

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
93
star
8

gio

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
41
star
9

pango

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
33
star
10

sys

DEPRECATED, each crate has its own sys folder now.
Rust
31
star
11

gtk-test

Testing GTK UI
Rust
30
star
12

gdk

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!
Rust
30
star
13

gir-files

Shell
25
star
14

sourceview

sourceview binding for Rust
Rust
21
star
15

gtk-rs.github.io

The gtk-rs.org website
SCSS
20
star
16

examples4

DEPRECATED, use https://github.com/gtk-rs/gtk4-rs repository instead!
Rust
16
star
17

gdk-pixbuf

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
15
star
18

pangocairo

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
9
star
19

webkit2gtk-webextension-rs

[UNMAINTAINED] WebKit2GTK+ Web Extensions bindings and wrappers for Rust
Rust
9
star
20

gdk4

DEPRECATED, use https://github.com/gtk-rs/gtk4-rs repository instead!
Rust
8
star
21

gsk4

DEPRECATED, use https://github.com/gtk-rs/gtk4-rs repository instead!
Rust
7
star
22

atk

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!
Rust
7
star
23

gobject-subclass

Rust GObject subclassing infrastructure
Rust
6
star
24

soup-sys-rs

[UNMAINTAINED] Soup FFI crate for Rust
Rust
4
star
25

lgpl-docs

LGPL-licensed docs for Gtk-rs crates
Rust
4
star
26

tests

tests for gtk-rs
Rust
3
star
27

graphene

DEPRECATED, use https://github.com/gtk-rs/gtk-rs-core repository instead!
Rust
3
star
28

gdkx11

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!
Rust
3
star
29

docs

The old source repo of http://gtk-rs.org/docs/
HTML
2
star
30

release

Python
2
star
31

checker

Repository which contains various scripts to run for CI
Python
2
star
32

gir-ctest

Rust
1
star
33

gir-format-check

Rust
1
star