Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

Look into a generation mode for single-threaded libraries #23

@mzabaluev

Description

@mzabaluev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions