KDAB introduced Servo WebView for Qt

Servo Web Engine in Qt

Servo Web Engine in Qt

KDAB (a leader in providing Qt, C++ and 3D/OpenGL software expertise on desktop, embedded and mobile platforms) announced recently through his blog, the release of “Servo WebView for Qt”. This new tool use the motor browser Servo instead of Chromium-based Qt WebEngine module, offering an alternative to display web content in QML applications.

Servo is a project initially developed by Mozilla and now under the direction of the Linux Foundation, it stands out for being a web rendering engine written in Rust, focused on memory safety and efficient use of modern multicore systems.

Among its features most notable are andl support for multithreaded rendering of web pages, parallelization of operations with the DOM and use of secure programming mechanisms provided by Rust. Unlike the Firefox browser engine, which employs single-threaded content processing schemes, Servo is specifically designed to take advantage of modern multicore systems by splitting the DOM and executing subtasks in parallel, thus optimizing the use of multiple CPU resources. cores. Mozilla has integrated parts of Servo into Firefox, such as the multithreaded CSS engine and the WebRender rendering system.

About Servo WebView Qt

The integration of Servo WebView in Qt applications aims to improve performance and offer greater efficiency, This integration also contributes significantly to the security of Qt applications. Servo integration in Qt is achieved through the CXX-Qt layer, which acts as a bridge between Rust and C++. This layer allows the creation of Rust components that integrate seamlessly with C++ programs using Qt. This opens up new possibilities for Qt application development with a focus on security and web display performance.

At KDAB we managed to integrate the Servo web engine within Qt, using our CXX-Qt library as a bridge between Rust and C++. This means we can now use Servo as an alternative to Chromium for web views in Qt applications.

From a QML perspective, this component is similar to Chromium WebView, in that canGoBack provides properties and methods. The QML element itself acts the same and the content is rendered to match its size. canGoForwardloadingtitleurlgoBackgoForward

In the advertisement, it is mentioned that sOne of the biggest advantages of Servo WebView is expected to be the ability to reduce the attack surface in Qt applications. that use the WebView API, thanks to the use of the Rust language that minimizes the appearance of vulnerabilities related to memory management errors.

In addition to this, it is also mentioned that Integration offers a number of benefits, including:

  1. Greater security: Being written in Rust, Servo reduces the attack surface and minimizes vulnerabilities related to memory management, contributing to a more secure web browsing experience for users of Qt applications.
  2. Better performance: Servo's focus on parallelization and efficient use of multi-core CPU resources improves web viewing performance in Qt applications, delivering a smoother and more responsive experience.
  3. Flexibility and Scalability: The integration of Servo into Qt through CXX-Qt provides a flexible and scalable platform for web application development, opening up new possibilities for content- and feature-rich applications.

Regarding future development and improvement plans, Integration is mentioned for additional research and improvements in the bridge between Rust and Qt, improvements in the API for embedded systems, improvements in the framebuffer object that forces the use of the OpenGL backend, among other things.

Finally, it should be mentioned that Servo WebView code for Qt is licensed under MPL-2.0 and if you are interested in being able to know more about it, you can consult the details In the following link.