wiki:WPE

Version 16 (modified by ChangSeok Oh, 5 years ago) (diff)

--

WPE WebKit

WPE WebKit is a WebKit port intended to allow embedders to create simple and performant systems based on Web platform technologies. It is designed with hardware acceleration in mind, leveraging common 3D graphics APIs for best performance.

Cross-building WPE

Building WPE WebKit With Yocto / OpenEmbedded

If you are building a system with Yocto or OpenEmbedded and you want to build last stable versions of WPE for it, a good resource is the layer meta-webkit.

Be sure to check its wiki that has some useful information about how to start, including a detailed step-by-step guide about how to do that for the RPi

Building WPE natively

Building WPE WebKit from a release tarball

To build WPE WebKit, you need to install two dependencies first (both available here):

  • libwpe (previously known as libWPEBackend): this is the base library for WPE abstractions to provide platform EGL surfaces and handling input;
  • WPEBackend-fdo: this is the reference WPE backend implementation, using freedesktop.org technologies and used for testing upstream WPE.

Both of these libraries can be compiled and installed as usual using CMake. For example, for a release build with debug info:

$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
$ ninja
$ sudo ninja install

You can then build and install WPE WebKit similarly. The only trick is that you must pass the CMake option -DPORT=WPE. For example, to do a release build with debug info and install the result:

$ cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
$ ninja
$ sudo ninja install

If you want to build WPE WebKit for production use, you should stop reading here. The rest of the instructions on this page are only suitable for development and testing.

Building WPE WebKit from git

If you want to do development on WebKit itself, you'll need a git checkout. You'll also need to use our JHBuild moduleset to build several dependencies, as using other versions of dependencies may cause layout tests to fail. The following steps are suitable for WebKit development only, not for production builds. Our JHBuild moduleset does not receive security or bugfix updates and it is not suitable for any purpose other than development and running layout tests. Do not run against untrusted websites.

  1. Get the code
git clone git://git.webkit.org/WebKit.git WebKit
# You can use also the mirror https://github.com/WebKit/webkit
  1. Install dependencies
cd WebKit
Tools/wpe/install-dependencies
  1. Build internal JHBuild
Tools/Scripts/update-webkitwpe-libs
  1. Build the WPE port of WebKit
Tools/Scripts/build-webkit --release --wpe
  1. Launch dyz (WPE basic webview)
Tools/Scripts/run-minibrowser --wpe https://www.igalia.com
  • Note: This last step should be run from a Wayland environment (Weston or similar). See below for a workaround if you are using X11.

Running from X11

Currently WPE doesn't support X11 natively, so if you can switch to a Wayland session for testing, then better. Otherwise, you can run it from a Weston window inside X11. You can automate the process of launching a Weston window and then dyz inside with this script. Save it on the directory above your WebKit dir, make it executable and run it from there like:

cd WebKit
../run-wpe-x11 https://www.igalia.com

But take into account this method of running it is not advised and some things like videos may not work properly.