Gcenx / macOS_Wine_builds

Official Winehq macOS Packages
459 stars 23 forks source link

Is there an advantage to building wine and wine64 natively for aarch64 when running on an M3 processor? #74

Closed w1ebr closed 6 months ago

w1ebr commented 6 months ago

The subject is my question. I have spent hours trying to build wine from source only to have ASP keep me from running it

Gcenx commented 6 months ago

A There no point build wine for aarch64.

rxhfcy commented 6 months ago

Random possibly totally clueless comment:

In practice, almost all Windows applications use x86 (i.e. NOT ARM64/aarch64) under the hood, but native ARM Wine would only be able to run ARM Windows apps (which are pretty uncommon) natively. The reason why “normal” x86 Wine is able to run x86 Windows apps on ARM macOS is because Apple’s emulator/translator (Rosetta 2) silently takes care of the required x86 emulation in the background.

Using native ARM Wine to run x86 applications will probably not be impossible in the future, it's just not possible yet, and it will also always require using some kind of x86 emulation. For example, I believe Hangover (https://github.com/AndreRH/hangover) aims to enable doing just that (only on Linux though). However, Hangover is still experimental and currently only runs 32-bit Windows x86 apps (!), with support for 64-bit Windows x86 apps hopefully coming in the future (many/most modern Windows apps will require 64-bit support).

Is there an advantage to building wine and wine64 natively for aarch64 when running on an M3 processor?

To answer the original question: if what you’re actually trying to accomplish is to be able to run ARM Windows applications on ARM macOS, using ARM Wine natively would potentially be very advantageous indeed (I'm pretty sure it wouldn't work yet though, because ARM support in Wine is currently still pretty immature).

But if you want to run x64 Windows applications with ARM Wine, it’s not possible yet. The potential advantage would be that the Wine compatibility layer itself wouldn’t need to use an emulator (i.e. that part would hopefully run faster than emulated x86 Wine), but x86 emulation will still always be needed to run the actual x86 Windows programs themselves.

w1ebr commented 6 months ago

My question was directed at whether running the windows services provided by wine natively would improve performance for applications as well. I don’t know how performant Rosetta 2 is at translating SIMD code to NEON code and I wonder if some software, including games, might show measurable improvement if the Windows provided graphics engines (like Direct X whatever ) ran using processor native SIMD instructions

Gcenx commented 6 months ago

wine built for aarch64 can only run arm64 Windows applications/games.

wine built for x86_64 can run x86 (32 & 64-bit) Windows applications/games.

Rosetta2 doesn’t support AVX extensions.