1. 22
  1. 3

    A nice proof of concept!

    Building app UI logic in Rust is kind of the final frontier - Rust on iOS via FFI goes fine but this demo is a much harder proposition. Every app has a considerable amount of unique UI which means whatever Rust wrapper around UIKit you’re using, you’re going to be writing a fair bit of it. Every step of the way, your competitor is the existing ObjC tooling with its abundant docs and SO posts. Is the bug because you’re misconfiguring the UIViewController or because you made a mistake in the Rust bridging? At the end of the day you still need Xcode and a Mac to build and run the thing. Anyone who’s working on this is really dedicated to the cause - I wish them luck and patience.

    One nice thing about the Rust ecosystem is that many crates will implement Rust/ObjC bridging internally. Here’s an example of using AppKit to read the clipboard. Thanks to these thoughtful crate authors, you can call a generic get_contents() method without breaking the illusion that you’re writing “pure Rust”.

    1. 1

      Absolutely, it is much nicer to write in Objective C than mimic ObjC with Rust. I thought it could be useful, for, say games where you need only thin layer to get graphical stuff, but then OpenGL is deprecated, and dealing with Metal not much fun from Rust either.

    2. 3

      Oh, it’s an iOS app proof of concept, not reimplementing all of iOS. XD