Re: [rust-dev] Importing foreign refcounted, non-threadsafe objects (GObject)

2013-04-08 Thread Daniel Micay
On Mon, Apr 8, 2013 at 4:06 AM, Patrick Walton pwal...@mozilla.com wrote: On 4/7/13 7:49 AM, Mikhail Zabaluev wrote: Hi, I've started playing with Rust bindings to GObject: https://github.com/mzabaluev/grust The intent is to make any API that provides a GObject introspection safely usable

Re: [rust-dev] Importing foreign refcounted, non-threadsafe objects (GObject)

2013-04-08 Thread Mikhail Zabaluev
Hi Patrick, 2013/4/8 Patrick Walton pwal...@mozilla.com This is a use case for the `#[nonsendable]` or `#[nonowned]` annotation on structs. This annotation isn't implemented yet, but it's a common feature request, as it will be needed for non-thread-safe reference-counted smart pointers too.

[rust-dev] Importing foreign refcounted, non-threadsafe objects (GObject)

2013-04-07 Thread Mikhail Zabaluev
Hi, I've started playing with Rust bindings to GObject: https://github.com/mzabaluev/grust The intent is to make any API that provides a GObject introspection safely usable in Rust. There are two important things about GLib objects: 1. The objects are reference counted in a thread-safe way. 2.