Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every windows program has to (eventually) call a Linux library, since Wine emulates Windows on top of Linux.

Take for example "decoding an MP3 frame". A 32bit program calls a Windows API to decode an MP3 frame, that gets intercepted by Wine and forwarded to libmpg123. Since it's a 32bit program, you need (or needed, until now) the 32bit mpg123 library to handle the request.

So it's not a matter of a Windows program actually calling a Linux library, but rather Wine forwarding the function call

Forwarding 32bit calls to 64bit functions sounds simple, but it is incredibly complex. It might be simple for a function that only takes an int as argument, but on Windows, functions often take pointers to Windows structures, and those structures are often different between 32 and 64 bit. You have to translate them on-the-fly....



Wine emulates Windows APIs.

You would need something like qemu to do arm->x86-64 to do CPU emulation and then use WINE to run Windows programs on a Raspberry Pi.


I think your comment went to the wrong post.

I know how Wine works, and in my example I explicitly said "API". And I don't think I ever said something about ARM or the RaspberryPi?

My point was to explicitly make it simple to understand, as most people don't know what thunks are, or trampolines, or the differences between protected mode and long mode. And yes, I called Wine an emulator, because that's what it is...


https://github.com/ptitSeb/box64 can do it a little lighter than a full qemu VM


> Every windows program has to (eventually) call a Linux library, since Wine emulates Windows on top of Linux.

Obligatory reminder: Wine Is Not Emulator.


The word is overloaded and the implication that emulator means ISA emulation is why Wine for a time adopted that expansion. It still very much emulates the Windows ABI and API.

It's original name was "Windows Emulator", even, hence the abbreviation Wine.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: