GIR lookups in GTK-RS apps

Do gi repository lookups happen during compilation or runtime for gtk-rs code?

In other words,

When I am running a gtk-rs app, is it using C functions and strucs directly or using libgirepository to look them up?

It’s using C functions directly and the overhead involved is about the same as doing it from C, except for the case of conversion from Rust to C strings which requires a copy to add the NUL-terminator.

If you look at the code of the bindings, e.g. here that should be relatively clear.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.