WebAssembly对嵌入式系统制造商重要吗?

Does WebAssembly Matter for Embedded System Makers?

WebAssembly对嵌入式系统制造商重要吗?

September 26, 2022 by Peter Schneider | Comments

​2022年9月26日 Peter Schneider评论

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?

WebAssembly是一种新兴技术,它允许使用C++等语言编程的高性能应用程序在web浏览器中运行。这些应用程序被编译为二进制格式,然后在浏览器中的沙盒环境中执行。对于创建资源密集型桌面应用程序(如图像处理或游戏)的开发人员来说,这是一个好消息。但WebAssembly与嵌入式设备制造商有何关联?

What are the Benefits of WebAssembly for Embedded Device Makers?

WebAssembly对嵌入式设备制造商有什么好处?

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.

WebAssembly可以用于实现独特的用例,这在以前需要做更多的工作。有了WebAssembly,任何人都可以将其Qt应用程序作为目标平台重新编译,使其在web浏览器中运行。在构建结合JavaScript和WebAssembly组件的所有新web应用程序时,还可以重用Qt应用程序的部分。这将大大减少开发工作。它还可以提高可用性,因为UI元素可以跨不同的平台使用。

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.

此外,使用WebAssembly技术的应用程序在web浏览器中运行,无需安装。如果Qt应用程序应该被带到移动设备上,并且应用程序商店发布过于繁琐,那么WebAssembly是绕过应用程序商店的好方法。

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.

公平地说,这里应该提到WebAssembly有一些限制,因为它在web浏览器的沙盒环境中运行。默认情况下,WebAssembly无法访问目标设备的低级硬件功能。这样做是为了提高WebAssembly应用程序的安全性。它还允许应用程序在多个平台和多个web浏览器上运行而无需修改。

Implementing Remote UIs and Headless Devices

实现远程UI和无头设备

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.

​嵌入式设备的远程UI越来越流行。WebAssembly是实现远程UI的一种好方法。重用现有用户界面实现的大部分可以让嵌入式系统制造商创建额外的远程显示器,甚至完全替换内置显示器。重用当前的Qt应用程序代码大大加快了这种转换。在这里查看我的博客文章。

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.

最近的一项嵌入式行业研究表明,工业机器的远程管理是一种发展趋势。超过77%的工业自动化行业受访者同意远程管理,包括集中监控,将在未来十年发挥重要作用。

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

资料来源:Qt嵌入式市场和垂直趋势,Qt公司委托数字产品人员进行的研究,2022年8月

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.

WebAssembly提供了一种低成本的入门级产品,用于为连接的设备实施集中式监视解决方案。通过重用以前用于嵌入式设备的Qt代码,特别是UI元素,嵌入式系统制造商可以设计和开发在标准平板电脑和台式电脑上运行的远程管理解决方案。此外,WebAssembly还非常适合计算资源密集型人工智能算法,这可能是远程管理解决方案的一部分。

UI Prototype Collaboration

UI原型协作

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.

WebAssembly的另一个便利用例是在开发过程中与所有涉众共享应用程序。重新编译Qt应用程序,将其放在web服务器上,然后在任何地方与任何人共享URL,这样可以轻松收集反馈。不需要共享未完成的目标硬件;人们不需要经历应用商店发布过程。然而,人们可以接触到任何数量的终端用户,以收集关于即将推出的产品或新功能的反馈。

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.

Qt公司已实施此用例,以允许在Qt Design Viewer的UI合成阶段进行协作。这个由WebAssembly支持的应用程序允许Qt应用程序开发人员与全球任何人共享Qt design Studio中的交互式设计。

Image: Qt Design Viewer

图片:Qt Design Viewer

Conclusion

结论

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.

一个人不必是桌面应用程序或游戏开发人员就可以对WebAssembly感兴趣。我甚至会更进一步:嵌入式设备行业有太多吸引人的用例,我声称嵌入式设备制造商除了将WebAssembly视为其产品战略中的补充技术之外,别无选择。由于安全问题,会有一些阻力(比如所有新事物),如果需要低级硬件访问,也会有一些延迟。这在当前的WebAssembly实现中还无法实现,但WebAssemply生态系统正在努力克服这些挑战。但即将到来的趋势,如远程管理和远程UI,将加速WebAssembly的采用。WebAssembly在嵌入式设备行业的成功可能是由重用现有代码的实际好处或显著提高高性能操作的可持续优势驱动的。我预测WebAssembly将有一个美好的未来,为新的创新打开大门。

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

​如果你有兴趣了解更多关于Qt for WebAssembly的信息,可以在这里查看最新的博客文章。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值