On 11/12/2013 10:18 PM, Patrick Walton wrote:
On 11/13/13 12:06 PM, Daniel Micay wrote:
If a library takes a callback, writing safe Rust bindings isn't going to
turn out well. Rust functions can fail, so the Rust API can't pass an
arbitrary function to the callback.
Yeah, this has been a concern for a while (years). Maybe we should have
an unsafe "catch" just for this case, to allow turning a Rust failure
into a C-style error code.
Patrick
Is that not, essentially, just spawning a task inside the Rust callback
and catching the result (via task::try)?
-SL
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev