KDAB has announced the development of the Servo WebView component for Qt, which utilizes the Servo browser engine instead of the Qt WebEngine module (based on Chromium) for rendering web content in QML applications. The project aims to reduce the attack surface of Qt applications using the WebView API by employing a component that minimizes the occurrence of vulnerabilities caused by memory management errors, thanks to the Rust programming language. The Servo WebView code for Qt is distributed under the MPL-2.0 license.
To enable the operation of Servo code written in Rust within a C++ environment, the CXX-Qt layer is employed. CXX-Qt allows the creation of components in Rust that can be integrated with C++ applications utilizing Qt. The use of CXX-Qt enables the creation of QObject subclasses in Rust, which can be used in C++, QML, and JavaScript code. Additionally, there is the capability to create Rust programs that invoke C++ code, for which Rust bindings over the standard classes QtCore and QtGui are provided.
The Servo project was originally developed by Mozilla but later came under the auspices of the Linux Foundation. The engine is distinguished by its support for multi-threaded rendering of web pages, parallelization of DOM (Document Object Model) operations, and the use of safe programming mechanisms provided by Rust. At the time of Servo's inception, the Firefox browser engine could not fully utilize the potential of modern multi-core systems due to its reliance on single-threaded content processing schemes. Servo was designed from the ground up to support splitting DOM code and rendering into smaller sub-tasks that can be executed in parallel, thereby making more efficient use of multi-core CPU resources. Some parts of Servo, such as the multi-threaded CSS engine and the WebRender rendering system, have already been integrated into Firefox.
Related projects include Tauri-Servo, which develops the backend for the WRY library based on the Servo engine, allowing Servo to be used in applications built on the Tauri framework (a competitor to the Electron platform for creating desktop applications using web technologies).
Source: opennet.ru
