Running WebKit on Windows
Updated: 2022-02-14
I’m working on WebKit on Windows these days. Sometimes I see someone asking about WebKit for Windows. I would summarize the current situation.
AppleWin port
AppleWin port is an upstream port that is used for iTunes for Windows. It uses the same components with Mac port, i.e. Core Graphics and Core Foundation, etc.
It supports only WebKit1. They removed AppleWin WebKit2. And, WebKit thread is not separated from UI thread. The browser becomes unresponsive while running JavaScript benchmarks.
AppleWin port is supporting both 32bit and 64bit versions because iTunes for Windows is supporting them. However, the 32bit version of Windows JavaScriptCore is supporting only Low-Level Interpreter C Loop, not supporting JIT. LLInt CLoop has the high stack consumption issue for MSVC.
The latest 64bit built binary can be downloaded from Buildbot. You need to install iTunes on your PC by using an MSI installer. You can’t use the Microsoft Store version of iTunes.
- https://www.apple.com/itunes/download/win64
- How to run the latest WebKit ( Safari ) on Windows
- https://bugs.webkit.org/show_bug.cgi?id=206350
AppleWin has disabled WebInspectorUI as default. WebInspector can’t be used with the binaries.
You can compile out both 32bit and 64bit AppleWin port by yourself. However, the required library WebKitSupportLibrary.zip is not redistributable.
WinCairo port
WinCairo port is a redistributable upstream Windows port. It supports both WebKit1 and WebKit2, but it plans to remove WebKit1.
It supports only 64bit. Its JavaScriptCore supports LLInt Asm, baseline JIT, and DFG JIT, but neither FTL JIT nor Web Assembly.
The latest built binary can be downloaded from Buildbot.
Latest #WebKit MiniBrowser for Windows based on WinCairo 64https://t.co/SpdGSAsvW3 :
— Friedhold Matz (@FriedholdMatz) June 24, 2020
Todo: `Download build artifacts from Buildbot` .
~ 125mb
I'd like to embed this as WKwebView in Java .. but I can't. pic.twitter.com/uCBnngXPK9
Microsoft Playwright is distributing WinCairo port WebKit with some modifications.
Playwright (WebKit on Windows) pic.twitter.com/PCluWMkI2s
— Fujii Hironori (藤井宏憲) (@fujii0) June 17, 2020
Here is the list of Microsoft Playwright modifications to WinCairo as far as I know.
- Disabled high DPI support
- Disabled GPU process mode
- Use the complex text code path always
- Added a option to disable accelerated compositing (–disable-accelerated-compositing)
If you have installed npm, you can run Playwright by the following command.
npx playwright wk https://webkit.org/
QtWebKit
QtWebKit a downstream port that supports WebKit1 and WebKit2.
In WebKit1, WebKit thread and UI thread are separated. It seems that Accelerated Compositing doesn’t work on Windows.
WebKitGTK
WebKitGTK is a well maintained upstream port but doesn’t support Windows. So, Cygwin or WSL and X11 server (VcXsrv or Cygwin/X) are needed to run. Cygwin has Epiphany and Midori packages, but very old.
You can use Microsoft Playwright on WSL.
wget https://playwright.azureedge.net/builds/webkit/1317/webkit-ubuntu-20.04.zip
unzip webkit-ubuntu-20.04.zip
apt-get install libnotify4 libenchant1c2a libgstreamer-plugins-bad1.0-0
./minibrowser-gtk/pw_run.sh https://google.com
See browsers.json and browserFetcher.ts for the URL of the distribution.
Now, WebKitGTK and WPE WebKit have nightly build archives. Bug 215266 – [GTK][WPE] Add a script for generating MiniBrowser bundles
WPE WebKit
WPE WebKit is a well maintained upstream port but doesn’t support Windows.
JavaFX WebKit
Arunprasad Rajkumar is working on it in June 2019. But I don’t know.
MontionMark 1.1
I found a StackOverflow question of WinCairo performance. Here are the benchmark results on my PC.
| Browser | MontionMark 1.1 |
|---|---|
| AppleWin r249040 (32bit) AC | 8.39 |
| AppleWin r249040 (32bit) non-AC | 8.68 |
| WinCairo r249042 (64bit) WK2 non-AC | 136.66 |
| WinCairo r249042 (64bit) WK1 AC | 68.99 |
| QtWebKit (64bit) WK1 non-AC | 115.18 |
| Firefox 68.0.2 (64bit) | 272.57 |
| Firefox 68.0.2 (64bit) no-GPU | 105.12 |
- Windows 10 version 1903 with 150% device scale factor display
- AppleWin: https://s3-us-west-2.amazonaws.com/archives.webkit.org/win-x86_64-release/249040.zip (This is a 32bit version regardless of the URL)
- WinCairo: https://s3-us-west-2.amazonaws.com/archives.webkit.org/wincairo-x86_64-release/249042.zip
- QtWebKit: otter-browser-win64-1.0.81-weekly272-setup.exe with manually adjusting zooming level
Here are the screenshots.