Does WebAssembly Matter for Embedded System Makers?

WebAssembly is an emerging technology that allows high-performance apps programmed with languages like C++ to run in web browsers. These applications are compiled into binary format and then executed in the browser in a sandboxed environment. This is excellent news for developers that create resource-intensive desktop applications such as image processing or gaming. But how is WebAssembly relevant for embedded device makers?

What are the Benefits of WebAssembly for Embedded Device Makers?

WebAssembly can be used to implement unique use cases, which required much more work previously. With WebAssembly, anybody can take their Qt application to run in a web browser by recompiling it for WebAssembly as a target platform. It is also possible to reuse parts of a Qt application when building all new web applications combining JavaScript and WebAssembly components. This will reduce the development effort significantly. It also might improve usability because UI elements are used across different platforms.

Furthermore, applications using WebAssembly technology run in a web browser with zero installation. If Qt applications should be taken to mobile devices and the app store publishing is too cumbersome, then WebAssembly is a good way to bypass app stores.

To be fair, one should mention here that WebAssembly comes with restrictions because it runs in a sandboxed environment in the web browser. WebAssembly does not have access by default to the low-level hardware capabilities of the target device. This has been done to increase the security of WebAssembly applications. It also allows the applications to run on multiple platforms and many web browsers without modifications.

Implementing Remote UIs and Headless Devices

Remote UIs for embedded devices are becoming more popular. WebAssembly is a great way to implement remote UIs. Reusing large parts of an existing User Interface implementation allows embedded system makers to create an additional remote display or even replace the in-built display altogether. Reusing the current Qt application code speeds up this transition dramatically. See my blog post on the topic here.

Centralised Monitoring

A recent embedded industry study revealed that remote management of industrial machines is a growing trend. Over 77% of the respondents from the industrial automation industry agree that remote management, including centralized monitoring, will play a significant role in the next ten years.



Source: Qt Embedded Market & Vertical Trends, Research by the Digital-Product-People commissioned by the Qt Company, August 2022

WebAssembly provides a low-cost entry to implement centralized monitoring solutions for connected devices. By reusing Qt code previously used to power embedded devices, especially UI elements, embedded system makers can design and develop remote management solutions that run on standard tablets and desktop computers. Furthermore, WebAssembly is also great for computing resource-intensive Artificial Intelligence algorithms, which might be part of the remote management solution.

UI Prototype Collaboration

Another handy use case for WebAssembly is sharing applications with all stakeholders during the development process. Recompiling a Qt application, putting it on a web server, and then sharing the URL with anybody, anywhere, makes collecting feedback easy. One doesn't need to share the unfinished target hardware; one doesn't need to go through an app store publishing process. Yet one can reach any amount of end users to collect feedback on an upcoming product or a new feature.

The Qt Company has implemented this use case to allow collaboration during the UI composition phase in the Qt Design Viewer. This application powered by WebAssembly allows Qt application developers to share an interactive design composed in the Qt Design Studio with anybody across the globe.


Image: Qt Design Viewer


One doesn’t have to be a desktop app or game developer to be interested in WebAssembly. I would even go further: There are so many attractive use cases in the embedded device industry that I claim that embedded device makers have no other option than to consider WebAssembly as a complementary technology in their product strategy. There will be some resistance due to security concerns (like for everything new), and there will be some delays if low-level hardware access is required. This isn't yet accessible in the current implementation of WebAssembly, but the WebAssembly ecosystem is working on overcoming these challenges. But upcoming trends such as remote management and remote UIs will accelerate the adoption of WebAssembly. The success of WebAssembly in the embedded device industry might be driven by the practical benefit of reusing existing code or by the sustainable advantage of being dramatically better for high-performance operations. I forecast an excellent future for WebAssembly, opening the doors for new innovations.

If you are interested in knowing more about Qt for WebAssembly, you can check out the latest blog post here.

Blog Topics: