Reduce code duplication between macOS and iOS
There's duplicated code in:
- src/platform_impl/macos
- src/platform_impl/ios
Maybe introduce src/platform_impl/common_apple as a module that can hold common code for Apple platforms.
Since "common_apple" isn't itself a device, I think that may not be the most organized place to put the common lib. What if we did something similar to the Xorg/Wayland setup? Something like this:
- platform_impl/
- apple/
- common/
- ios/
- macos/
- mod.rs
- ...
- apple/
I might be interested in working on it, I'm interested in the project and have been trying to find ways to help here and there. So far documentation only, but this seems like a good way to help clean up and learn more about the project.
I'd personally rather have src/api/common_apple, but afaik, this is a minor detail to be bikesheding on.
I also think platform_impl/apple/... makes more sense than my original suggestion.
@alasher As a first step, you could maybe start just moving the existing modules to their new place, without introducing a common module yet, to test out how the new layout feels.
Then, like in a separate PR, tackle moving the common bits to a common module.
(I personally prefer having two separate PRs / master commits for this.)