I use the official binaries (28.0.50 prerelease) for MS Windows. I am using gccemacs on my home Linux machines, and feel like native-comp on Windows would be really useful for me at work. However, I don't have a MingW toolchain installed. Is anyone providing gccemacs binaries for MS-Windows?
Thanks to many people and their work here, the emacs native-compilation feature is now available on windows 10. Still yet you have to compile it yourself (from the Emacs master branch).
First install msys2/mingw64 and all the required development packages for emacs (see nt/INSTALL.W64 in emacs source). Then install gcc and, of course, libgccjit. This later is now available as a regular mingw64 package.
Then, still following nt/INSTALL.W64 :
./autogen.sh ./configure --without-dbus --without-pop --with-native-compilation --prefix=/your/install/path make -j$(nproc) # or make NATIVE_FULL_AOT=1 -j$(nproc) // longer make install
Then create a batch script with :
@ECHO OFF TITLE Emacs - native-compilation SET HOME=C:\Users\yourname C: CD %HOME% IF EXIST .emacs.d\server\server DEL .emacs.d\server\server SET PATH=C:\msys64\mingw64\local\bin;C:\msys64\mingw64\bin;%PATH% C:\msys64\mingw64\local\bin\emacsclientw.exe -n -a C:\msys64\mingw64\local\bin\runemacs.exe -e "(make-frame-visible)"
And then, you can run it by clicking on the batch script as any other windows 10 program.
I assume your msys64 installation is at C:\msys64 and that emacs - nativecomp is installed at C:\msys64\mingw64\local so as to not interfere with the default emacs 27.1 mingw64 package.
It is mandatory to add "C:\msys64\mingw64\bin" to the windows path because emacs needs some libraries at startup which are in there.
You can install the pre-release version by using:
# Open mingw shell (e.g. msys2) pacman -U mingw-w64-x86_64-emacs-native-compilation-*-any.pkg.tar.zst
The request for merging this into
MINGW-packages main fork (thus making Emacs native comp available via MINGW's
pacman) was not approved, because native compilation is still an experimental feature. So for now, I can only provide it on my fork of the