I've been quite focused on this project simply being "improve the safety of Objective-C in Rust", but @silvanshade recently proposed that we try to reach higher than just that, instead try going for "something that is (at least somewhat) competitive with Swift".
This required a bit of a mental shift for me, but ultimately, I think it is the right way to go about it. This change in mindset should help me realize that tooling, e.g. good rust-analyzer and debugger support, is really important, and we should spend effort on that not just in this project, but also in requesting changes to Rust to make it possible.
Some way to better declare categories - for example allows us to represent them as a trait, possibly as "inherent traits?"
Some way for the compiler to automatically convert Id<NSButton> to Id<NSView>, since calling Id::into_super (potentially many times) is quite cumbersome. Maybe the coerce unsized feature will do it for us?
I've been quite focused on this project simply being "improve the safety of Objective-C in Rust", but @silvanshade recently proposed that we try to reach higher than just that, instead try going for "something that is (at least somewhat) competitive with Swift".
This required a bit of a mental shift for me, but ultimately, I think it is the right way to go about it. This change in mindset should help me realize that tooling, e.g. good
rust-analyzer
and debugger support, is really important, and we should spend effort on that not just in this project, but also in requesting changes to Rust to make it possible.A few subtasks:
header-translator
as a public tool)Allocated
andId
Id<NSButton>
toId<NSView>
, since callingId::into_super
(potentially many times) is quite cumbersome. Maybe the coerce unsized feature will do it for us?#[distributed_slice]
, as suggested by epage in their blog post about testing would be really nice for makingdeclare_class!
cleaner.linkme
static
s would work similar toextern
statics, in that you can't performconst
operations on them.Sel
with each function, very similar to what Swift does.MainThreadMarker
,AutoReleasePool<'p>
and availability easier to use (contexts & capabilities)header-translator
work intobindgen
.objc2
support incbindgen
.