Skip to content

Reduce code duplication between macOS and iOS #1029

Open

Description

@felixrabe

There's duplicated code in:

Maybe introduce src/platform_impl/common_apple as a module that can hold common code for Apple platforms.

Activity

  1. added
    D - easy
    H - good first issue
    DS - uikit
    DS - appkit
    P - normal
    S - enhancement
    on Jul 8, 2019
  2. alasher commented on Jul 15, 2019

    @alasher
    Contributor

    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
      • ...

    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.

  3. goddessfreya commented on Jul 15, 2019

    @goddessfreya
    Contributor

    I'd personally rather have src/api/common_apple, but afaik, this is a minor detail to be bikesheding on.

  4. felixrabe commented on Jul 16, 2019

    @felixrabe
    ContributorAuthor

    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.)

  5. self-assigned this
    on Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

D - easyDS - appkitDS - uikitH - good first issueP - normalS - enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions