# sys **Repository Path**: heiwuqi/sys ## Basic Information - **Project Name**: sys - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-23 - **Last Updated**: 2024-09-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # sys Autogenerated __FFI__ definitions for various __GNOME__ libraries. ## Building This repository contains the "sys" crates – FFI definitions intended for use in the actual bindings (e.g. [gtk](https://github.com/gtk-rs/gtk)). Each crate expects the development files of the respective library to be installed on the system. ## Library versions The installed library version is detected via `pkg-config` in the build script, which controls conditional compilation so only the functions availiable in that library version are visible. For instance, if the `gdk-sys` crate's build script detects `libgdk3` version `3.12`, it sets a number of `cfg` directives `gdk_3_4`, `gdk_3_6`, ..., up to`gdk_3_12`. Correspondingly, the definitions of functions introduced in version `x.y` carry `#[cfg(gdk_x_y)]` attributes. (The build script actually contains a complete list of the versions it knows, `3.4` doesn't have any special meaning, it's just the first in that list in that crate). The build script passes that set of directives on to its dependencies, so a depenendent crate's build script will see ``` env::var("DEP_GDK_CFG").unwrap() == "gdk_3_4 gdk_3_6 gdk_3_8 gdk_3_10 gdk_3_12" ``` ## Generating ```shell > make ``` will build the [generator](https://github.com/gtk-rs/gir) in `gir` and generate the crates using specifications from `conf` and [GIR definitions](https://github.com/gtk-rs/gir-files) from `gir-files`. Currently `gir-files` is populated from the [gnome-staging ppa](https://launchpad.net/~gnome3-team/+archive/ubuntu/gnome3-staging). Using a single set of GIR definitions for all platforms and versions is considered good enough at this point.