There are libraries, most notably Gtk+ and GDK,that expect all their usage to occur within a single thread, except for some thread-safe functions and objects. To bind these libraries safely, it seems necessary to generate code differently, passing a reference to a non-sendable global context object to every function that is not designated thread-safe or does not use some non-sendable objects from the same library.
Typically, such libraries have one or more initialization functions of which one must be called before any other use of the library can occur. These can be represented in Rust by functions returning the library context value.