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

aarch64/Apple Silicon/M1 support #1789

Closed
Byron opened this issue Dec 6, 2020 · 8 comments
Closed

aarch64/Apple Silicon/M1 support #1789

Byron opened this issue Dec 6, 2020 · 8 comments

Comments

@Byron
Copy link

Byron commented Dec 6, 2020

When trying to compile Alacritty (and probably many more) on Apple Silicon, the compilation fails without the fix in 3a077ff .

A patch release would be greatly appreciated. Thank you.

@kchibisov
Copy link
Member

Winit doesn't have a known way to perform patch releases unfortunately, I'll try to come up with something.

@Byron
Copy link
Author

Byron commented Dec 6, 2020

It looks like in case of alacritty, the build then fails when compiling glutin with:

glutin git:(master) ✗ cargo build
    Updating git repository `https://github.com/rust-windowing/winit`
    Updating crates.io index
   Compiling cocoa v0.24.0
   Compiling winit v0.23.0 (https://github.com/rust-windowing/winit#8fb7aa5c)
   Compiling glutin v0.25.1 (/Users/byron/dev/glutin/glutin)
error[E0432]: unresolved import `winit::platform::desktop`
  --> glutin/src/platform/mod.rs:33:30
   |
33 |     pub use winit::platform::desktop::*;
   |                              ^^^^^^^ could not find `desktop` in `platform`

@kchibisov
Copy link
Member

The patch release can't be done without cherry picking things and moving them into a separate branch. I'm also not sure how winit scrips are working here. I think we can do a major release soon-ish, but can't say more.

@Byron Byron changed the title Would it be possible to publish a patch release to fix aarch64/Apple Silicon/M1? aarch64/Apple Silicon/M1 support Dec 7, 2020
@Byron
Copy link
Author

Byron commented Dec 7, 2020

Thanks a lot, I think I went ahead being a bit too specific in the title and just corrected that.
I will take a look and see why glutin doesn't manage to compile in the desktop module.

Lastly, if you need any testing, I am happy to help.

@Byron
Copy link
Author

Byron commented Dec 7, 2020

It looks like glutin fails to compile due to breaking changes in master.

--- a/glutin/src/platform/mod.rs
+++ b/glutin/src/platform/mod.rs
@@ -30,7 +30,7 @@ pub mod desktop {
         target_os = "netbsd",
         target_os = "openbsd",
     ))]
-    pub use winit::platform::desktop::*;
+    pub use winit::platform::run_return::*;
 }
 
 use std::os::raw;

With this patch applied locally, alacritty gets past its initial build failure. Here is the override in Cargo.toml (note that it still doesn't work, but it's nothing related to this repository.

--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,3 +8,7 @@ members = [
 lto = true
 debug = 1
 incremental = false
+
+[patch.crates-io]
+winit = { git = "https://github.com/rust-windowing/winit" }
+glutin = { path = "/path/to/glutin/glutin" }

@frewsxcv
Copy link
Contributor

frewsxcv commented Dec 7, 2020

@kchibisov Are you aware of any blockers to publishing a new release? This is the last crate I need updated for an app I'm building to get it working on Apple Silicon.

@ifsheldon
Copy link

+1, waiting for the new release of winit to compile my code on Apple Silicon Mac

@maroider
Copy link
Member

@ifsheldon If you haven't seen it yet, there'll be a release when #1793 gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants