Skip to content

Replace objc with objc2 in other projects #174

Open

Description

@madsmtm

As part of moving towards a (somewhat stable) version, I'd like to submit PRs to other projects to set an ecosystem-wide precedence for using this crate, and to see which patterns people are actually using that objc2 doesn't (or doesn't easily) help with.

Popular reverse-dependencies of objc on crates.io (as of the issue creation date):

Others:

Using CoreFoundation:

Using SystemConfiguration:

Using Security:

Using IOKit:

Using CoreServices:

Using dispatch:

Activity

  1. added
    help wantedExtra attention is needed
    A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates
    A-frameworkAffects the framework crates and the translator for them
    A-block2Affects the `block2` crate
    on Jun 16, 2022
  2. added this to the objc2 v0.3 milestone on Jun 16, 2022
  3. pinned this issue on Aug 12, 2022
  4. jinleili commented on Sep 7, 2022

    @jinleili

    As soon as metal-rs merges the PR you replaced with objc2, I'm interested in completing the wgpu-hal part

  5. i509VCB commented on Nov 24, 2022

    @i509VCB

    Mentioning https://github.com/norse-rs/raw-window-metal since ash-window depends on it.

  6. removed this from the Usable icrate milestone on Sep 5, 2023
  7. pentamassiv commented on Nov 20, 2023

    @pentamassiv

    I created an issue to replace it in enigo enigo-rs/enigo#249

  8. paulora2405 commented on Nov 24, 2023

    @paulora2405

    I created an issue to replace it in enigo enigo-rs/enigo#249

    PR with the replacement of objc with icrate was merged in enigo-rs/enigo#250.

  9. notgull commented on Nov 24, 2023

    @notgull
    Contributor
  10. osiewicz commented on Dec 25, 2024

    @osiewicz

    I created an issue to replace our uses of objc with objc2 in Zed: zed-industries/zed#22408

  11. hoodie commented on Apr 6, 2025

    @hoodie

    @madsmtm you can check off mac-notification-sys with 0.6.4

  12. arihant2math commented on Oct 23, 2025

    @arihant2math

    I'm working on porting blurmac from objc to objc2 in servo's in-tree copy of it. I've run into the problem of ClassDecl::add_method being strict about what is allows as a method.

    Previously things like extern "C" fn(&mut Object, Sel) -> *mut Object worked, but it seems that is no longer the case. What would you suggest doing?

    (Code in https://github.com/servo/servo/blob/481f147143d155ae9cd5426eed47269e57bd6b47/third_party/blurmac/src/delegate.rs)

  13. madsmtm commented on Oct 23, 2025

    @madsmtm
    OwnerAuthor

    Try casting to extern "C" fn(_, _) -> _, Rust can be very particular about higher-kinded lifetimes, but doesn't allow properly expressing it in bounds.

    Also, IIRC I might've removed support for &mut Object, try &Object instead.

  14. arihant2math commented on Oct 23, 2025

    @arihant2math

    Thanks, that fixed it.

  15. nicoburns commented on Dec 15, 2025

    @nicoburns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frameworkAffects the framework crates and the translator for themA-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crateshelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions