News for hackers. Stuff that matters.
Re:Objective-Rust by raphlinus on Friday August 28, 2020 @07:27PM (#24311600)
I hope Rust / Objective-C interop gets some more love soon. There are a number of pain points, including inconsistent wrapping styles (the "cocoa" crate implements things like NSView as traits on id), autorelease pools always being a pain, and a fair amount of bloat from the msg_send! macro (a lot of which is boilerplate error handling).

Not exactly obj-C, but there are also problems two inconsistent ways of wrapping other macOS types: some (like the Metal crate) use foreign_types, while others use the TCFType mechanism. Among other things, these have two different meanings for "Ref" types, which can be very confusing.

So it's possible to get stuff done, but it doesn't feel nice. By contrast, the Rust/Windows world pretty well organized, with Peter Atashian's winapi providing a solid foundation, the wio crate being a good way to get ComPtr and other utilities, and Microsoft's com-rs coming soon as a standard way to do Rust-side implementation of COM interfaces.

Re:Objective-Rust by Klonoar on Friday August 28, 2020 @07:49PM (#24311757)
I experimented with this in cacao: https://github.com/ryanmcgrath/cacao

I just need to get around to "finishing" it. I think most of the other approaches miss what people would realistically need out of ObjC/Rust interop, so... well, that's my hat in the ring.

Re:Objective-Rust by raphlinus on Friday August 28, 2020 @07:55PM (#24311805)
Yup, that is a promising direction. I think a lot of my concern is around building a consensus and getting people on the same page.