Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update objc2 crates #3634

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Update objc2 crates #3634

merged 2 commits into from
Apr 18, 2024

Conversation

madsmtm
Copy link
Member

@madsmtm madsmtm commented Apr 17, 2024

Changes relevant to Winit:

  • icrate has been deprecated in favour of separate crates per framework, in our case objc2-foundation and objc2-app-kit (and in the future objc2-ui-kit on iOS).
  • Moved MainThreadMarker::run_on_main to free-standing function run_on_main.
  • Changed how features work, this should result in less code that we need to compile.
  • Enums are now real structs instead of type-aliases and free constants.

If possible, then I'd like to get this in before v0.30, as I'd like to move users away from icrate as quickly as possible (it's harder for me to release fixes to that crate). (Also, this is what's failing our CI, since i deprecated a bunch of stuff in icrate).

  • Tested on all platforms changed

@madsmtm madsmtm added this to the Version 0.30.0 milestone Apr 17, 2024
@madsmtm madsmtm force-pushed the madsmtm/update-objc2 branch from 18c09de to 0726ed8 Compare April 17, 2024 22:31
Changes relevant to Winit:
- `icrate` has been deprecated in favour of separate crates per
  framework, in our case `objc2-foundation` and `objc2-app-kit` (and in
  the future `objc2-ui-kit` on iOS).
- Moved `MainThreadMarker::run_on_main` to free-standing function
  `run_on_main`.
- Changed how features work, this should result in less code that we
  need to compile.
- Enums are now real structs instead of type-aliases and free constants.
@madsmtm madsmtm force-pushed the madsmtm/update-objc2 branch from 0726ed8 to be020a6 Compare April 17, 2024 22:46
@madsmtm madsmtm requested a review from kchibisov April 17, 2024 22:52
Copy link
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

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

Looks good as long as generated code is the same.

Small nit, but it's an artifact from some other PR.

src/platform_impl/macos/view.rs Outdated Show resolved Hide resolved
@madsmtm
Copy link
Member Author

madsmtm commented Apr 18, 2024

Looks good as long as generated code is the same.

Well... The generated code is different, the full diff can be viewed here. But the functionality is the same.

@madsmtm madsmtm merged commit 259e868 into master Apr 18, 2024
52 checks passed
@madsmtm madsmtm deleted the madsmtm/update-objc2 branch April 18, 2024 15:34
madsmtm added a commit to rust-windowing/glutin that referenced this pull request Apr 18, 2024
Changes relevant to glutin:
- `icrate` has been deprecated in favour of separate crates per
  framework, in our case `objc2-foundation` and `objc2-app-kit`.
- Moved `MainThreadMarker::run_on_main` to free-standing function
  `run_on_main`.
- Changed how features work, this should result in less code that needs
  to be compiled.

See rust-windowing/winit#3634 for the Winit
change.
madsmtm added a commit to rust-windowing/glutin that referenced this pull request Apr 18, 2024
Changes relevant to glutin:
- `icrate` has been deprecated in favour of separate crates per
  framework, in our case `objc2-foundation` and `objc2-app-kit`.
- Moved `MainThreadMarker::run_on_main` to free-standing function
  `run_on_main`.
- Changed how features work, this should result in less code that needs
  to be compiled.

See rust-windowing/winit#3634 for the Winit
change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants