madsmtm / objc2

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

Remove icrate's custom macros #593

Closed madsmtm closed 2 months ago

madsmtm commented 2 months ago

Part of https://github.com/madsmtm/objc2/issues/537.

To be able to split the frameworks out into separate crates, they each need to not depend on anything except objc2, block2, dispatch and each other. This PR takes the first (big) step towards doing so, by removing the custom macros, and avoiding the use of the imports from the common module outside of auto-generated code.

This makes the generated output more verbose, especially since we don't yet have #[derive(Encode, RefEncode)] (see #55), but should also make it easier for newcomers to understand what's going on (since it's "just" using the documented objc2 macros).