Skip to content

Move iOS and macOS implementations into new apple module - #3756

Merged
madsmtm merged 3 commits into
masterfrom
madsmtm/move-apple-impls
Jun 24, 2024
Merged

madsmtm merged 3 commits into
masterfrom
madsmtm/move-apple-impls

Conversation

@madsmtm

@madsmtm madsmtm commented Jun 24, 2024

Copy link
Copy Markdown
Member

Move iOS and macOS implementations to a shared folder called apple, to allow us to reduce the code-duplication between these platforms in the future.

The folder structure is now:

  • src/platform_impl/apple/
    • appkit/
    • uikit/
    • example_shared_file.rs
    • mod.rs

Part of #1029.

I considered calling the folder darwin, as that's the name of the underlying core OS that all of these platforms share, but the implementation here in Winit is really Apple-specific, i.e. even if Apple created a new OS different from Darwin, they would likely still port Foundation and UIKit to that, and the module name would still fit.

  • Tested on all platforms changed

@madsmtm madsmtm added DS - appkit Affects the AppKit/macOS backend DS - uikit Affects the UIKit backend (iOS, tvOS, watchOS, visionOS) S - maintenance Repaying technical debt labels Jun 24, 2024
@madsmtm
madsmtm requested a review from daxpedda as a code owner June 24, 2024 01:57
@madsmtm
madsmtm force-pushed the madsmtm/move-apple-impls branch from 57fc536 to f6e024a Compare June 24, 2024 02:01

@notgull notgull left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I hope this paves the way for further deduplication.

@madsmtm
madsmtm force-pushed the madsmtm/move-apple-impls branch from f6e024a to f7272df Compare June 24, 2024 06:17
@madsmtm
madsmtm force-pushed the madsmtm/move-apple-impls branch from f7272df to e7ee057 Compare June 24, 2024 11:14
@madsmtm
madsmtm merged commit 9d5412f into master Jun 24, 2024
@madsmtm
madsmtm deleted the madsmtm/move-apple-impls branch June 24, 2024 11:26
@ActuallyHappening

Copy link
Copy Markdown

I'm a bit of a noob, is the uikit for iOS and appkit for macOS?

@madsmtm

madsmtm commented Jun 25, 2024

Copy link
Copy Markdown
Member Author

Yup, but UIKit is also for tvOS, watchOS, visionOS and Mac Catalyst.

@madsmtm madsmtm mentioned this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DS - appkit Affects the AppKit/macOS backend DS - uikit Affects the UIKit backend (iOS, tvOS, watchOS, visionOS) S - maintenance Repaying technical debt

Development

Successfully merging this pull request may close these issues.

4 participants