/gtk4-rs

GTK 4 bindings and wrappers for Rust (Development)

Primary LanguageRustMIT LicenseMIT

gtk4-rs CI

A group of crates that aims to provide complete GTK 4 bindings. This repository contains all the "core" crates of GTK 4.

  • GTK
  • GDK: An intermediate layer which isolates GTK from the details of the windowing system.
  • GSK: An intermediate layer which isolates GTK from the details of the OpenGL or Vulkan implementation.

The GTK 4 crates also depends on other libraries part of the platform like:

Those are common with the GTK 3 and GStreamer bindings and are part of the gtk-rs repository.

For more information about each crate, please refer to their README.md file in their directory.

Required Rust version: 1.48+

Documentation

Development Branch

Contributing

The bindings are composed of two parts:

  • Automatically generated ones using gir
  • Manual parts

The automatic ones can be generated using the generator.py script

python3 generator.py

All the crates except gtk4-macros follow this structure

   ./crate 
   ├── Gir.toml
   ├── README.md
   ├── src
   │   ├── auto
   ├── sys
   └── tests
  • README.md: Explanations about the crate itself and eventually some details.
  • Gir.toml: Used by gir to generate most of the code.
  • src: Contains the source code of the crate.
  • src/auto: Contains the automatically generated part of the source code.
  • sys: Contains the 1:1 bindings of the C API.