tries to offer #[repr(Swift_5)]
I hear this story a lot about Rust, and it makes me wary of the language. Code that's written needs to keep working. What made you decide to use nightly in the first place?
Why wary? The whole point of experimental nightly is that you can try out new exciting features which are not stabilised yet. Sometimes they will be changed before a full release and you have to deal with it.
But if you stay with stable releases, code keeps working.
Kind of reminds of some godawful government websites which had very finicky requirements in which their ActiveX components would run: precise Internet Explorer builds, with these updates but NOT WITH THESE updates, and god forbid you update your Windows XP past SP1.
That's why it's strongly recommended not to use Nightly to write your programs: they'll almost certainly break, and since Nightly gets released every 24 hours they might break daily. If you don't have the time to fix things every day, you shouldn't be using the unstable features!
At least at the time (a year or so ago perhaps) it was not possible to actually use stable for regular development. Has this changed now?
This question is always multiple choice, so people who use Rust a lot may choose both nightly and stable. The vast majority of my projects target stable, with my operating system ones being the exception that use nightly.
Documentation for the various macros is at [1], which includes a number of small examples. There's a larger demo[2] that uses Metal to render an interactive image. There are also framework bindings for some common frameworks (I want to add bindings for all of Apple's frameworks, but I need finish the rewrite first). Those bindings include some uses of ivars on extern classes too[3].
[1]: https://gitlab.com/objrs/objrs/blob/master/DOCUMENTATION.md
[2]: https://gitlab.com/objrs/objrs/-/tree/master/demo
[3]: https://gitlab.com/objrs/objrs/-/blob/master/frameworks/foun...
You can implement new Objective-C classes directly in Rust. Or use Objective-C classes/methods from Rust. objrs is mostly a collection of macros that transforms the Rust code to be ABI-compatible with normal Objective-C code. There isn't any runtime work done by objrs. It's all done at compile time.
Here's an example of creating an new class:
I'm still slowly rewriting it. It requires nightly Rust, and unfortunately doesn't compile with the latest nightly. And it doesn't currently build from HEAD. But it's been a fun hobby project.