Provides Rust bindings for Gnome libraries

Overview

gtk-rs-core CI

The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries. You can find more about it on https://gtk-rs.org.

This repository contains all the "core" crates of the gtk-rs organization. For more information about each crate, please refer to their README.md file in their directory.

Minimum supported Rust version

Currently, the minimum supported Rust version is 1.51.0.

Documentation

Ecosystem

The gtk-rs-core repository contains Rust crates for the foundational GObject-based libraries. However there is a large ecosystem of GObject libraries and many of these libraries have Rust bindings based on the tooling included in gtk-rs. Of particular note:

Additionally, Rust bindings for various libraries are hosted on GNOME's GitLab instance and can be found at https://gitlab.gnome.org/World/Rust.

When using crates that are not part of the gtk-rs repository, you will need to be careful and ensure that they do not pull in incompatible versions of core crates like glib-rs.

Regenerating

To regenerate crates using gir, please use the generator.py file as follows:

$ python3 generator.py

Development

This repository is mostly split into two branches: master and crate. master contains the not yet released code and is where new developments are happening. crate contains the last release source code and isn't supposed to be updated.

This repository is structured as follows:

- crate/
   |
   |-- README.md
   |-- Gir.toml
   |-- Cargo.toml
   |-- src/
   |-- sys/

The crate is a "top" directory (so "atk" or "gdk" in here for example). Each crate contains:

  • README.md: explanations about the crate itself and eventually some details.
  • Cargo.toml: descriptor of the crate, used by cargo and Rust.
  • Gir.toml: configuration used by gir to generate most of the crates' code.
  • src: the source code of the crate.
  • sys: the 1:1 bindings of the C API.

The gir and gir-files top folders are not crates, but are git submodules which respectively contain the gir tool and the gir files used by the generator.

When running generator.py the tool will automatically update these git submodules and run the gir tool on the gir files to regenerate the code.

During development, it is useful to execute the generator with a different version of the gir tool or of the gir files, for instance to test if the code generation is successful before submitting a pull request to update one of the submodules. This can be done by specifying arguments to the generator script, for instance, to run the generator on a local copy of the gir files:

$ python3 generator.py --gir-files-directory ../gir-files/

See python3 generator.py --help for more details.

Comments
  • GString refactor

    GString refactor

    Update: See comment https://github.com/gtk-rs/gtk-rs-core/pull/600#issuecomment-1302872708 for the general status of this PR.

    Original comment: All of these TryFrom are panicking when they don't really need to. This is probably going to break some other things, I'd like to check this against gtk-rs and gstreamer-rs at least. Another option is to leave the panicking From traits in and also support TryFrom.

    Also makes GString deref as a GStr

    opened by jf2048 32
  • Consistently name macros

    Consistently name macros

    Currently many macros have a G/g as prefix while others don't. We should do this consistently.

    Any objections to drop the prefix on all macros?

    CC @bilelmoussaoui @GuillaumeGomez

    opened by sdroege 28
  • Remove `glib::String` (aka C `GString`) to avoid confusion with `glib::GString` (string allocated via the GLib allocator)

    Remove `glib::String` (aka C `GString`) to avoid confusion with `glib::GString` (string allocated via the GLib allocator)

    And potentially also rename glib::String to glib::StringBuilder (which Vala did, for example), but OTOH the Rust "string builder" type is also just called String.

    @bilelmoussaoui @GuillaumeGomez Opinions?

    glib 
    opened by sdroege 27
  • glib: add AnyGObject

    glib: add AnyGObject

    Motivation:

    Rust has a lot of crates with already-defined types. Those types can't be reimplemented as GObjects without a huge amount of efforts. I find the type AnyGObject to be extremely useful, especially when putting Rust types inside a gio::ListModel

    SendAnyGObject

    I don't know how to create an Any + Send + Sync variant. I know how to make a Rust type Send, but I don't know how to make a glib type Send.

    opened by ranfdev 25
  • Make stronger guarantees on `ToValue`

    Make stronger guarantees on `ToValue`

    This more or less reverts https://github.com/gtk-rs/glib/commit/390ca3a2 ("Don't implement ToValue for Value").

    Closes #4.

    To be honest, I'm not 100% sure if this is the best way forward. The traits and trait bounds are really convoluted and hard to keep track of. For example, I don't know how well this works for SendValue. Let me know what you think.

    opened by piegamesde 22
  • `clone!`: Change default for weak ref upgrade failure from return to panic

    `clone!`: Change default for weak ref upgrade failure from return to panic

    At the moment if clone! fails to upgrade a weak reference it logs a message and returns ().

        button_decrease.connect_clicked(clone!(@weak button_increase =>
            move |_| {
                number.set(number.get() - 1);
                button_increase.set_label(&number.get().to_string());
        }));
    

    When this occurs this is probably a bug. Changing the default to panic would make this more obvious.

    Disadvantages:

    • Breaking change from old behavior that is not easy to detect
    • For gtk apps it is questionable if you want the app of a user to crash because of this

    @sdroege, @YaLTeR

    glib-macros 
    opened by Hofer-Julian 19
  • [BUG] Attaching to context panics at 'assertion failed: context.is_owner()'

    [BUG] Attaching to context panics at 'assertion failed: context.is_owner()'

    Bug description

    After upgrading to gtk/glib 0.14.0 my application and all integration tests fail at:

    thread 'main' panicked at 'assertion failed: context.is_owner()', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.14.0/src/main_context_channel.rs:507:17
    

    I managed to reproduce it with a simple program:

    src/main.rs:

    const DEFAULT_CONTEXT : Option<&glib::MainContext> = None;
    
    fn main() {
        let (_sender, receiver) = glib::MainContext::channel(glib::PRIORITY_DEFAULT);
        let handler = move |event: i32| {
            println!("got event: {}", event);
            glib::Continue(true)
        };
        receiver.attach(DEFAULT_CONTEXT, handler);  // panics
    }
    

    Cargo.toml:

    [package]
    name = "glib-context-test"
    version = "0.1.0"
    edition = "2018"
    
    [dependencies]
    glib = "0.14.0"
    

    Tested on: Manjaro 21.0.7 Rust 1.53.0

    Backtrace

    $ RUST_BACKTRACE=full cargo run
       Compiling proc-macro2 v1.0.27
       Compiling unicode-xid v0.2.2
       Compiling syn v1.0.73
       Compiling serde v1.0.126
       Compiling anyhow v1.0.41
       Compiling unicode-segmentation v1.7.1
       Compiling either v1.6.1
       Compiling smallvec v1.6.1
       Compiling version-compare v0.0.11
       Compiling pkg-config v0.3.19
       Compiling strum v0.21.0
       Compiling version_check v0.9.3
       Compiling futures-core v0.3.15
       Compiling libc v0.2.97
       Compiling futures-task v0.3.15
       Compiling autocfg v1.0.1
       Compiling bitflags v1.2.1
       Compiling futures-channel v0.3.15
       Compiling pin-utils v0.1.0
       Compiling pin-project-lite v0.2.7
       Compiling slab v0.4.3
       Compiling once_cell v1.8.0
       Compiling itertools v0.10.1
       Compiling cfg-expr v0.7.4
       Compiling heck v0.3.3
       Compiling proc-macro-error-attr v1.0.4
       Compiling proc-macro-error v1.0.4
       Compiling futures-util v0.3.15
       Compiling quote v1.0.9
       Compiling futures-executor v0.3.15
       Compiling toml v0.5.8
       Compiling thiserror-impl v1.0.25
       Compiling strum_macros v0.21.1
       Compiling thiserror v1.0.25
       Compiling proc-macro-crate v1.0.0
       Compiling system-deps v3.1.2
       Compiling glib-macros v0.14.0
       Compiling glib-sys v0.14.0
       Compiling gobject-sys v0.14.0
       Compiling glib v0.14.0
       Compiling glib-context-test v0.1.0 (/home/user/dev/project/test/rust/glib-context-test)
        Finished dev [unoptimized + debuginfo] target(s) in 1m 03s
         Running `target/debug/glib-context-test`
    thread 'main' panicked at 'assertion failed: context.is_owner()', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.14.0/src/main_context_channel.rs:507:17
    stack backtrace:
       0:     0x564ba96568d0 - std::backtrace_rs::backtrace::libunwind::trace::ha5edb8ba5c6b7a6c
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
       1:     0x564ba96568d0 - std::backtrace_rs::backtrace::trace_unsynchronized::h0de86d320a827db2
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
       2:     0x564ba96568d0 - std::sys_common::backtrace::_print_fmt::h97b9ad6f0a1380ff
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:67:5
       3:     0x564ba96568d0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14be7eb08f97fe80
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:46:22
       4:     0x564ba9670e2f - core::fmt::write::h2ca8877d3e0e52de
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/fmt/mod.rs:1094:17
       5:     0x564ba96550c5 - std::io::Write::write_fmt::h64f5987220b618f4
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/io/mod.rs:1584:15
       6:     0x564ba965875b - std::sys_common::backtrace::_print::h7f1a4097308f2e0a
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:49:5
       7:     0x564ba965875b - std::sys_common::backtrace::print::h1f799fc2ca7f5035
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:36:9
       8:     0x564ba965875b - std::panicking::default_hook::{{closure}}::hf38436e8a3ce1071
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:208:50
       9:     0x564ba965822d - std::panicking::default_hook::he2f8f3fae11ed1dd
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:225:9
      10:     0x564ba9658d6d - std::panicking::rust_panic_with_hook::h79a18548bd90c7d4
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:591:17
      11:     0x564ba96588d7 - std::panicking::begin_panic_handler::{{closure}}::h212a72cc08e25126
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:495:13
      12:     0x564ba9656d6c - std::sys_common::backtrace::__rust_end_short_backtrace::hbd6897dd42bc0fcd
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:141:18
      13:     0x564ba9658869 - rust_begin_unwind
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5
      14:     0x564ba963dd91 - core::panicking::panic_fmt::h77ecd04e9b1dd84d
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14
      15:     0x564ba963dcdd - core::panicking::panic::h60569d8a39169222
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:50:5
      16:     0x564ba963f73a - glib::main_context_channel::Receiver<T>::attach::h594fcf9e7dc84a34
                                   at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.14.0/src/main_context_channel.rs:507:17
      17:     0x564ba964305d - glib_context_test::main::hc555b5f4c0db2dae
                                   at /home/user/dev/project/test/rust/glib-context-test/src/main.rs:9:5
      18:     0x564ba9641dcb - core::ops::function::FnOnce::call_once::h17df49f787978c02
                                   at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
      19:     0x564ba964003e - std::sys_common::backtrace::__rust_begin_short_backtrace::hc9dee5163aee7e43
                                   at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125:18
      20:     0x564ba96400c1 - std::rt::lang_start::{{closure}}::heeab27af11fe19e8
                                   at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:49:18
      21:     0x564ba965916a - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc4354216bf39217c
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/ops/function.rs:259:13
      22:     0x564ba965916a - std::panicking::try::do_call::hb68eb312780385cf
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:379:40
      23:     0x564ba965916a - std::panicking::try::h22b8e08595060b8b
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:343:19
      24:     0x564ba965916a - std::panic::catch_unwind::hc64f1a6a0e71b1fc
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panic.rs:431:14
      25:     0x564ba965916a - std::rt::lang_start_internal::h4461fc58637f04f8
                                   at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/rt.rs:34:21
      26:     0x564ba96400a0 - std::rt::lang_start::h6c3d3c3dbe636292
                                   at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:48:5
      27:     0x564ba964315c - main
      28:     0x7f3b4857db25 - __libc_start_main
      29:     0x564ba963e48e - _start
      30:                0x0 - <unknown>
    
    documentation glib 
    opened by ArekPiekarz 18
  • [BUG] failed to parse manifest

    [BUG] failed to parse manifest

    Bug description

    Cannot build project with glib 0.15.0. Version 0.14.8 works.

    Error message

    error: failed to parse manifest at `/home/remco/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.15.0/Cargo.toml`
    
    Caused by:
      can't find library `glib`, rename file to `src/lib.rs` or specify lib.path
    
    bug 
    opened by remcokranenburg 17
  • glib: Add WeakRefNotify

    glib: Add WeakRefNotify

    This adds a new weak reference for Objects, so that we can connect a callback for when the obejct is disposed.

    WeakRefLocal is needed because g_object_weak_ref and g_object_weak_unref. This adds a rust way to use g_object_weak_ref g_object_weak_unref.

    opened by jsparber 17
  • remove problematic phantom in glib_shared_wrapper

    remove problematic phantom in glib_shared_wrapper

    While trying to use a generic shared wrapper I got this error:

    warning: unnecessary parentheses around type                                                                           
       --> /home/lollo/gtk-rs-core/glib/src/shared.rs:34:47                                                           
        |                                                      
    34  |               phantom: std::marker::PhantomData<($($($generic),+)?)>,                                            
        |                                                 ^                 ^        
    

    But then I found out that field is useless anyway, because the generic type is already used in the field above, so I've removed the phantom field.

    opened by ranfdev 16
  • Panic if GString contains null byte

    Panic if GString contains null byte

    glib::GString::from("test\0");
    

    thread 'main' panicked at 'CString::new failed: NulError(4, [116, 101, 115, 116, 0])'

    Not surprising, but can we do something about it? I was thinking about dropping null bytes in the from() function. But maybe I'm just to obsessed with having code that cannot panic :laughing:

    glib 
    opened by sophie-h 16
  • Implement safe io

    Implement safe io

    Needs reviewing

    Stuff thats missing

    • [ ] unix_open_pipe (marked as unsafe for the moment)
    • [ ] spawn_async_with_pipes (marked as unsafe for the moment)
    • [x] spawn_async_with_fds
    • [x] g_subprocess_launcher_take_fd
    • [x] g_subprocess_launcher_take_stderr_fd
    • [x] g_subprocess_launcher_take_stderr_fd
    • [x] g_subprocess_launcher_take_stdin_fd
    • [x] g_subprocess_launcher_take_stdout_fd
    • [x] into_raw_unix_fd
    • [x] into_raw_unix_fd_local
    • [x] g_unix_fd_add_full
    opened by A6GibKm 2
  • [BUG] Documentation for glib::wrapper appears to be incomplete

    [BUG] Documentation for glib::wrapper appears to be incomplete

    The documentation for glib::wrapper! contains the following sentence:

    What follows is a description of each of the possible $kind: Boxed, Shared, and Object

    However, what follows is actually a description of four options, since BoxedInline is also documented.

    Additionally, from various other sources it would seem that ObjectSubclass is yet another acceptable $kind, yet does not appear to be documented in that page at all.

    bug 
    opened by Hawk777 2
  • Add `GStrv` kind of type to `glib::collections`

    Add `GStrv` kind of type to `glib::collections`

    CC @pbor

    This would be a NULL-terminated array of *const char, i.e. without length information stored. And would be useful for passing such things over FFI and e.g. borrowing *const *const char to C code.

    Should have the usual kind of APIs (iterator things, index, append, etc) for collections implemented.

    enhancement glib 
    opened by sdroege 0
  • [BUG] glib::SourceId is not thread safe

    [BUG] glib::SourceId is not thread safe

    Sending it to another thread (or just setting another default context) will cause incorrect things to happen when calling SourceId::remove.

    Background here: https://github.com/gtk-rs/gtk-rs-core/pull/818#discussion_r1046147923

    bug 
    opened by jf2048 0
Releases(0.16.7)
  • 0.16.7(Dec 16, 2022)

    Paolo Borelli (1):
          examples: spawn async gio task on the current thread context
    
    Sebastian Dröge (2):
          Fix various new beta clippy warnings
          Update versions to 0.16.7
    
    Source code(tar.gz)
    Source code(zip)
  • 0.16.6(Dec 12, 2022)

    Bilal Elmoussaoui (1):
          gio: Add a GioInfallibleFuture
    
    Sebastian Dröge (6):
          glib: Implement `IntoGlibPtr` for `Option<T>`
          glib: Implement `From<&GStr>` and `From<GString>` for `Cow<GStr>`
          glib: Fix docs typo
          Update versions to 0.16.6
    
    Source code(tar.gz)
    Source code(zip)
  • 0.16.5(Dec 5, 2022)

    Bilal Elmoussaoui (3):
          pango: Auto generate Language
          pango: Manually implement Language::to_string & Language::default
          Bump release to 0.16.5
    
    Sebastian Dröge (2):
          pango: Make `pango::Language::from_string()` infallible
    
    ranfdev (1):
          Add CastNone trait (#843)
    
    Source code(tar.gz)
    Source code(zip)
  • 0.16.4(Nov 28, 2022)

    Bilal Elmoussaoui (4):
          gdk-pixbuf: Add PixbufAnimation subclassing support
          gdk-pixbuf: Correct PixbufAnimationIter definition
          gdk-pixbuf: Add PixbufAnimationIter subclassing support
          gdk-pixbuf: Add PixbufLoader subclassing support
    
    Colin Walters (1):
          glib: Add a doc string for `as_ptr` generated impls
    
    Jason Francis (2):
          glib: fix undefined behavior in types::register_type
          update windows CI to glib 2.74
    
    Sebastian Dröge (3):
          glib: Document the value guarantees for `ObjectImpl::set_property()` and `property()`
          Update versions to 0.16.4
    
    Source code(tar.gz)
    Source code(zip)
  • 0.16.3(Nov 13, 2022)

    Aaron Erhardt (1):
          image: Rebuild once every week
    
    Colin Walters (1):
          Move `g_cancellable_set_error_if_cancelled()` to manual
    
    Guillaume Gomez (3):
          regen
          Fix clippy lints
          Fix new clippy lints
    
    Jason Francis (2):
          glib: fix more clippy lints for rust 1.66
          glib: update compiletest output errors for rust 1.65
    
    Sebastian Dröge (8):
          Move from `imp.instance()` to `imp.obj()`
          gio: Require glib 0.16.2 for `ObjectSubclass::obj()`
          Update gir
          Regenerate with latest gir
          Update versions to 0.16.3
    
    Source code(tar.gz)
    Source code(zip)
  • 0.16.2(Oct 23, 2022)

    Bilal Elmoussaoui (3):
          gio: Add helpers for setting SettingBinding flags
          glib: Fix docs links
          gio: Add set_only/get_only helpers to BindingBuilder
    
    Sebastian Dröge (3):
          glib: Add `ObjectSubclass::obj()` as a shorter alias for `instance()`
          glib: Add unsafe bindings to `g_object_run_dispose()`
          Update versions to 0.16.2
    
    anteater (1):
          Correct outdated references to `subclass::simple`
    
    Source code(tar.gz)
    Source code(zip)
  • 0.16.1(Oct 21, 2022)

    Bilal Elmoussaoui (2):
          glib: Add helpers for setting property bindings flags
          cairo: Fix rectangle getter
    
    Sebastian Dröge (2):
          glib: Add a getter for `ObjectBuilder::type_`
          Update versions to 0.16.1
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.12(Jun 27, 2022)

    Ben Kimock (1):
          Fix off-by-one in GString::from (and missing null)
    
    Bilal Elmoussaoui (3):
          CI: remove -sys conditions tests for windows
          gdk_pixbuf: opt-in for gi-docgen
          CI: update the gh-package job
    
    Jason Francis (13):
          glib: allow unused imports in gobject::auto
          cairo: restrict pdf tests to only emit PDF 1.5
          Port Dockerfile to fedora rawhide and use system deps from git
          ci: Bump versions in image workflow
          image: Don't build gdk-pixbuf tests
          ci: Bump versions in image workflow
          ci: push image to github container repository
          dockerfile: disable gdk-pixbuf man pages
          ci: add toplevel repo to safe.directory when running checker
          ci: bump some more action versions
          ci: use set-safe-directory for gtk-rs/checker checkout
          Revert "ci: use set-safe-directory for gtk-rs/checker checkout"
          ci: don't build full gtk in windows ci
    
    Matteo Biggio (5):
          glib: add missing emit_by_name methods
          SocketAddressEnumerator: `next` return value should be nullable
          translate.rs: free the container memory also when the container is empty
          gstring: implement AsRef<Path> for GString and GStr
          ProcessLauncher: `close` method should be available on unix only
    
    Maximiliano Sandoval R (4):
          Fix GBindingGroup bindings
          binding_group: Correct doc for build
          binding_group: Add test
          Use RefCell::take() when possible
    
    Mițca Dumitru (3):
          cairo: Add safety docs for low hanging fruits
          gio: Add safety docs for Unix and Win32 streams
          glib: Add safety docs for log_writer_default_set_use_stderr
    
    Sebastian Dröge (14):
          glib/gio: Implement `FusedFuture` / `FusedStream` in some places
          Implement `FusedIterator` for various custom iterators
          Fix/silence various new clippy warnings
          bindinggroup: Make sure to use NUL-terminated strings for the `source_property` in all cases
          bindinggroup: Fix test by making the binding bidirectional as expected from the test
          bindingroup: Pass a `String` to the transform function instead of a `*const u8`
          bindingroup: Fix transform_to test
          bindinggroup: Add test for changing the value type between properties
          binding: Add tests for Binding
          ci: Fix syntax in windows.yml
          Update versions to 0.15.12
    
    ranfdev (7):
          remove unused mod_name in define_param_spec!
          add common numeric spec impl, common assert_param_name
          remove useless from_glib in min_max macro
          add #[track_caller] to assert_param_name
          fully define a corresponding `Builder` for each `ParamSpec`
          reuse new fn in ParamSpecOverride
          impl Default for ParamFlags
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.11(Apr 26, 2022)

    Jason Francis (9):
          glib-macros: Fix clippy lints
          glib: Generate docs for BindingGroupBuilder
          glib: implement ValueTypeOptional for Variant, VariantType, BoxedValue
          glib: Add safety docs for WatchedObject::borrow
          glib: Implement Sync for WatchedObject
          Implement ValueTypeOptional for BoxedInline and cairo types
          cairo: Fix soundness in ToValueOptional for inline structs
          cairo: Implement FromValue for reference types
          cairo: Implement GValue wrappers for Matrix
    
    Luca BRUNO (1):
          glib/variant: add some more safe wrappers
    
    Mițca Dumitru (5):
          gdk_pixbuf: Improve `Pixbuf::pixels` documentation
          glib: Remove redundant null-checks before `g_free`
          glib: Remove redundant null-checks before `free`-like functions
          gio: Remove redudant null-checks before `g_free`
          gio: Remover redundant null-checks before `g_strdup`
    
    Paolo Borelli (1):
          error: add `matches` method
    
    Rodrigo Rivas Costa (1):
          glib: Fix conversion between Variant and OsString/PathBuf.
    
    SeaDve (1):
          glib-macros: Remove boxed_nullable and shared_boxed_nullable attribute for glib::Boxed
    
    Sebastian Dröge (12):
          glib: Fix build with `v2_72` and require 2.72.0 now
          Fix a couple of new clippy warnings
          gio: Update serial_test dependency to 0.6
          glib: Add `to_glib_full()` for `Path` / `OsStr`
          glib: Fix `mkdtemp()` and `mkdtemp_full()`
          glib: Add new `ObjectImplRef` and `ObjectImplWeakRef` types
          glib: Add getter for `glib::Error` domain quark
          ci: Update gvsbuild version
          ci: Switch to windows-2019 image
          Update versions to 0.15.11
          glib: Lower glib-macros version requirement to 0.15.10
    
    ranfdev (1):
          remove extend_from_slice position subtraction, add test
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.10(Mar 19, 2022)

    Jason Francis (6):
          glib: Add GStr for borrowing GStrings
          glib: Finish adding all structured logging functions
          glib: Simplify g_log_inner and g_print_inner
          glib: Optimize GlibLogger to avoid some copies
          glib: Disable log_structured doc test before v2_50
          Use Send+Sync for more Boxed types
    
    Paolo Borelli (3):
          Update gir
          regen
          gio: add AsyncInitable
    
    Sebastian Dröge (5):
          Update versions to 0.15.10
          glib: Depend on glib-macros 0.15.10
    
    arcnmx (4):
          glib: clarify wording on VariantTy fns
          glib: impl FromStr for VariantType
          glib: VariantTy tuple type iterator
          glib: print and parse for Variant
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.9(Mar 10, 2022)

    Sebastian Dröge (4):
          glib: Add license file to gobject-sys
          glib: Allow borrowing a `ParamSpec` reference from a `Value`
          Update versions to 0.15.9
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.8(Mar 8, 2022)

  • 0.15.7(Mar 8, 2022)

    Guillaume Gomez (1):
          Fix clippy lints
    
    Jason Francis (5):
          Add new classes from glib 2.72
          Fix broken gnome/gtk doc links
          glib: Use "%s" instead of replacing % in log functions
          glib: Correctly cast log messages to C char types
          Use glib 2.71 for minimum v2_72 pkg-config versions
    
    Sebastian Dröge (2):
          Update versions to 0.15.7
    
    ranfdev (3):
          make generics work in boxed_inline wrapper macro
          fix warning about unnecessary parentheses in boxed_inline
          impl `ToValue`, `FromValue` for char
    
    songww (2):
          pango: Add LayoutLine.runs()
          pango: Add missing getter for GlyphItemIter.
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.6(Feb 20, 2022)

    Colin Walters (1):
          translate: Pre-allocate Rust hashmap at correct size
    
    Hofer-Julian (1):
          glib: add trait `StaticTypeExt` with method `type_ensure`
    
    Jason Francis (1):
          glib-macros: Pass a pointer for watched objects into closure macro
    
    Sebastian Dröge (14):
          Update versions to 0.15.5
          Handle empty slices correctly
          Update gir-files
          glib: Mark `UnicodeScript::Math` as available in 2.72
          gio: Implement `File::move_async` manually
          glib: Ignore aligned allocation functions
          glib: Fix handling of closures that provide a return value pointer that is initialized to `G_TYPE_INVALID`
          glib: Add an `Object` specific value type checker
          glib: Don't use `from_glib_full()` for the individual items of an array for boxed inline types
          Regenerate
          Update versions to 0.15.6
    
    arcnmx (6):
          glib: Variant::from_dict_entry
          glib: VariantType::new_dict_entry
          glib: VariantType::new_array
          glib: VariantType::new_maybe
          glib: VariantType::new_tuple
          glib: impl AsRef<Variant> for Variant
    
    songww (1):
          Add missing pango attrs
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.5(Feb 6, 2022)

    Matteo Biggio (1):
          gtask: fix memory leak in when calling g_task_return_value
    
    Sebastian Dröge (5):
          Update gir-files
          Regenerate with latest gir-files
          gio: Add version to `CredentialsType::Win32Pid`
          Update versions to 0.15.5
    
    arcnmx (8):
          glib: Pointer type
          glib: give a name to c_void
          glib: basic Pointer tests
          glib: impl FromGlib<gconstpointer> for Pointer
          glib: explicitly alias Pointer as `ffi::gpointer`
          glib: dynamic type APIs for Variants and Values
          glib: `Variant::as_maybe()`
          glib: remove all translate traits from pointers
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.4(Jan 31, 2022)

    Paolo Borelli (1):
          gio: add Initable::with_type
    
    Sebastian Dröge (14):
          Update manual implementations to not require `Send` closures for GIO-style async functions
          Update gir-files
          glib/gio: Remove unnecessary overrides
          gio: Add `v2_72` feature
          gio: Add 2.72 marker to `G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD`
          Update gir
          Regenerate with latest gir
          Update versions to 0.15.4
          gio: Use correct callback type for `File::copy_async()`
          glib: Pass module path instead of `None` for the function
          glib: Never pass `NULL` to `g_log_structured_standard()`
          gio/gdk-pixbuf: Depend on glib 0.15.3 for `ThreadGuard` API
    
    Source code(tar.gz)
    Source code(zip)
  • 0.15.3(Jan 24, 2022)

    Andrey Kutejko (1):
          glib-macros: Remove redundant allocations
    
    Andy Russell (1):
          glib: implement To/FromVariant for OS strings and paths (#483)
    
    Paolo Borelli (1):
          glib: Add more documentation on how to replace g_signal_connect_object
    
    Sebastian Dröge (5):
          glib: Add an object builder
          glib: Provide `ThreadGuard` and `thread_id()` as public API
          gio: Use `ThreadGuard` from glib instead of providing a separate implementation
          Update versions to 0.15.3
    
    ranfdev (2):
          glib-macros: use bool::then in subclass macro
          glib-macros: reduce subclass macro size
    
    Source code(tar.gz)
    Source code(zip)
Owner
Bindings and wrappers for gnome libraries
null
Provides Rust bindings for GTK libraries

gtk3-rs The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries. You can find more about it on https://gtk-rs.org. This

null 431 Dec 30, 2022
Do is a rewrite of Gnome To Do in Rust.

Do Do is a rewrite of Gnome To Do in Rust using gtk-rs and Relm4, we aim to improve on the existing set of features provided by To Do to provide the u

Eduardo Flores 142 Dec 20, 2022
Better GNOME Desktop Experience

Better GNOME Desktop Experience Tired of having the best feeling DE with the worst defaults? This app is for you. Transform the default GNOME look to:

Dimitar Dimitrov 3 May 10, 2022
Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS

core-foundation-rs Compatibility Targets macOS 10.7 by default. To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To hav

Servo 685 Jan 2, 2023
Use C++ libraries from Rust

ritual ritual allows to use C++ libraries from Rust. It analyzes the C++ API of a library and generates a fully-featured crate that provides convenien

Rust-Qt 1.1k Jan 5, 2023
Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

null 1.9k Dec 22, 2022
A tongue-in-cheek GUI that provides similar functionality to GNU cat

catboy a tongue-in-cheek GUI that provides similar functionality to GNU cat information: Attribute Value Development Status: Active Neglect Price: I h

toasterrepairman 2 Feb 9, 2022
Provides core language-agnostic functionality for LiveView Native across platforms

LiveView Native Core This repository contains an implementation of the LiveView Native core library, which is intended to handle all the details which

LiveView Native 35 Dec 27, 2022
Provides event handling for egui in SDL2 window applications.

egui-sdl2-event Provides event handling for egui when SDL2 is used as the windowing system. This crate does not perform any rendering, but it can be c

Valtteri Vallius 8 Feb 15, 2023
Rust bindings for the FLTK GUI library.

fltk-rs Rust bindings for the FLTK Graphical User Interface library. The FLTK crate is a crossplatform lightweight gui library which can be statically

Mohammed Alyousef 1.1k Jan 9, 2023
Rust bindings for Dear ImGui

imgui-rs: Rust bindings for Dear ImGui (Recently under new maintenance, things subject to change) Window::new(im_str!("Hello world")) .size([300.0

null 2k Jan 7, 2023
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`

Improved User Interface A cross-platform UI toolkit for Rust based on libui iui: ui-sys: iui is a simple (about 4 kLOC of Rust), small (about 800kb, i

Rust Native UI Group 865 Dec 27, 2022
QML (Qt Quick) bindings for Rust language

QML-rust - bindings for Qt Quick Bindings are based on DOtherSide C bindings for QML Library is mostly feature-compliant with other bindings based on

Oak 204 Dec 8, 2022
Rust bindings for Sciter

Rust bindings for Sciter Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust). Introduction Sciter is an embeddable mu

Terra Informatica Software, Inc 757 Dec 30, 2022
Drew's fast Rust AppKit bindings

Drew's fast Rust AppKit bindings Provides select Rust bindings for Apple AppKit framework. This may be compared to, appkit crate cacao objrs_framework

Drew Crawford 2 Oct 28, 2022
Rust bindings for Dear ImGui

imgui-rs: Rust bindings for Dear ImGui (Recently under new maintenance, things subject to change) ui.window("Hello world") .size([300.0, 100.0], C

null 2k Jan 7, 2023
Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo.

THIS REPOSITORY IS DEPRECATED SEE: https://github.com/rust-gnome rgtk Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo. Building rgtk expe

Jeremy Letang 124 Jul 10, 2022
Rust bindings for the FLTK GUI library.

fltk-rs Rust bindings for the FLTK Graphical User Interface library. The fltk crate is a cross-platform lightweight gui library which can be staticall

fltk-rs 1.1k Jan 9, 2023
The bindings to the Nuklear 2D immediate GUI library.

nuklear-rust The bindings to the Nuklear 2D immediate GUI library. Currently beta. Drawing backends: gfx-pre-ll for GFX 3D drawing engine (examples: O

Serhii Plyhun 332 Dec 27, 2022