The new version of the QBS 2.0 compilation system arrives

QbS

Qbs is a community driven, language agnostic build automation system. It is fast and offers an easy to learn language based on QML.

The release of Qbs 2.0, a free and open-source, cross-platform software for managing the software development process, was recently announced . It was designed to support large and complex projects written in various programming languages, primarily C/C++.

The new version 2.0 is significant in its version number, as it is associated with the implementation of a new JavaScript backend , which replaced QtScript, which became obsolete in Qt 6.

For those unfamiliar with Qbs, it uses a simplified version of the QML language to define project build scripts, allowing for fairly flexible build rules that can connect external modules, use JavaScript functions, and create arbitrary build rules.

Qbs is unique in that it has no mechanism for internal builds, guaranteeing the ability to create multiple builds from a single source tree, including building from a single command invocation and in parallel.

This is a key feature, ensuring that source files remain unaffected if a build directory is deleted and that no output artifacts are written to the source directory. Qt is required as a dependency to build Qbs, although Qbs itself is designed to organize the assembly of any project.

The scripting language used in Qbs is tailored to automate the generation and parsing of build scripts by IDEs. Furthermore, Qbs does not generate makefiles and, without intermediaries like the make utility, controls the release of compilers and linkers, optimizing the build process based on a detailed graph of all dependencies.

The presence of initial data on the structure and dependencies in the project allows you to effectively parallelize the execution of operations in several threads. For large projects consisting of a large number of files and subdirectories, the performance of rebuilds using Qbs can be several times better than make: the rebuild is almost instantaneous and does not waste developer time waiting.

Main novelties of QBS 2.0

This new release of QBS 2.0 is notable, as mentioned at the beginning, because of the new JavaScript engine that replaces QtScript, which became obsolete for Qt 6, since it was considered unrealistic to continue maintaining QtScript alone due to complex bindings to JavaScriptCore.

The prospect of keeping QtScript with its complex dependency didn't seem particularly appealing. However, neither candidate offered an API to intercept property accesses, something the developers say they absolutely need for performance reasons.

From the user's point of view, there should be no noticeable changes; in particular, the performance seems to be about the same. However, QtScript was pretty lenient in accepting undefined values ​​in contexts where it didn't have to, so the new implementation might uncover some bugs in your projects.

The engine is compliant with the ES2019 specification and significantly outperforms its existing counterparts (XS by 35%, DukTape by more than twice, JerryScript by three times, and MuJS by seven times). From a build script development perspective, the transition to a new engine should not result in any noticeable changes.

Performance will also remain almost the same. Among the differences, the new engine has stricter requirements for the use of null values, which may reveal issues in existing projects that went unnoticed when using QtScript.

In addition, it is also mentioned that qmake project files were removed, which resulted in a reduction of maintenance work for the developers.

Finally it is mentioned that version 2.1 will see a rewrite of the code with which the developers presume that they will have several new features, as well as general performance improvements.

If you are interested in learning more, you can find the details at the following link.


Add as preferred source in Google