madsmtm / objc2

Bindings to Apple's frameworks in Rust
https://docs.rs/objc2/
MIT License
309 stars 39 forks source link

Improve Xcode support #459

Open madsmtm opened 1 year ago

madsmtm commented 1 year ago

There is a bunch of Rust tools out there that ease access to (parts of) Xcode:

But all of them currently feel quite clunky, or are missing a lot of functionality.

If we actually desire at least somewhat competitiveness with Swift (https://github.com/madsmtm/objc2/issues/429), it needs to be easy to:

All of these are certainly possible to do outside of Xcode, and we should strive towards that eventually, but it's going to take a lot of time for the ecosystem to get there! So instead, we should start by making it easier to work with Rust projects inside Xcode!

Perhaps a path forward would be some combination of rust-xcode-plugin, a Source Editor Extension and cargo-xcode? Ideally, we'd want full LSP-like support, and probably eventually some kind of IBAction/IBOutlet support, but having a solid way to run Rust applications from inside Xcode would be a huge step!

Let's also remember that Rust is not the only ecosystem that has this problem, perhaps we can learn from what others are doing? Mentioning XcodeGen here.

madsmtm commented 1 year ago

Whether or not we (as in, this project) end up solving these problems, we need to curate and link users to the current best solutions.

madsmtm commented 9 months ago

Related: https://github.com/RalfJung/cargo-careful/issues/22

madsmtm commented 6 months ago

Swift has something called Package Plugins, specifically the "build tool plugin" may allow us to easily invoke Cargo from Xcode

madsmtm commented 6 months ago

For interface builder support, this removed document detailing the legacy IB plug-ins might reveal some more information on how these links work?

Maybe it utilizes NSKeyValueBindingCreation?

madsmtm commented 4 months ago

Linking places where rustc could be improved: