File: README.md

package info (click to toggle)
rust-gtk 0.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 3,792 kB
  • sloc: makefile: 20; sh: 17
file content (81 lines) | stat: -rw-r--r-- 2,522 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
70
71
72
73
74
75
76
77
78
79
80
81
# gtk [![Build Status](https://travis-ci.org/gtk-rs/gtk.png?branch=master)](https://travis-ci.org/gtk-rs/gtk) [![Build status](https://ci.appveyor.com/api/projects/status/5mot32ipr12iocw0?svg=true)](https://ci.appveyor.com/project/GuillaumeGomez/gtk) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gtk-rs/gtk)

[Project site](http://gtk-rs.org/) | [Online documentation](http://gtk-rs.org/docs/)

__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 [requirements page](http://gtk-rs.org/docs/requirements.html).

## Using

We recommend using [crates from crates.io](https://crates.io/keywords/gtk-rs),
as [demonstrated here](http://gtk-rs.org/#using).

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

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

Avoid mixing versioned and git crates like this:

```toml
# 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][gtk-md] due to
licensing issues. You can pull it in with cargo:

```shell
> 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:

```shell
> 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:

```shell
> cargo doc --features v3_16
```

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

[gtk-md]: https://github.com/gtk-rs/lgpl-docs/blob/master/README.md

## Contribute

Contributor you're welcome!

See the general [bindings documentation](http://gtk-rs.org/docs/glib/).

Most of the bindings ([`src/auto`](src/auto)) are generated by [gir](https://github.com/gtk-rs/gir) using [this configuration file](Gir.toml). After editing `Gir.toml` the sources can be regenerated with

```shell
> make gir
```

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

## License

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