在资源受限的物联网设备上使用WebAssembly:性能、效率与可移植性
WebAssembly on Resource-Constrained IoT Devices: Performance, Efficiency, and Portability
AI总结:
本文研究了WebAssembly在资源受限物联网设备上的性能、效率和可移植性,通过对比原生C执行与WASM运行时,发现WASM在跨平台兼容性和安全性方面具有优势,适用于对性能要求不高的嵌入式物联网应用。
摘要:
物联网中硬件和软件的日益异构性给在资源受限设备上软件的可移植性、可维护性和部署带来了重大挑战。WebAssembly(WASM)最初是为网页设计的,现在越来越多地被认可为一种可移植、安全且高效的运行时环境,能够克服这些挑战。本文通过在三个代表性微控制器上评估WASM的性能、内存占用和能耗来探讨其在嵌入式物联网系统中的可行性:Raspberry Pi Pico、ESP32 C6和nRF5340。将两个轻量级WASM运行时WAMR和wasm3与原生C执行进行比较。结果表明,尽管原生执行在速度和能耗方面仍占优,但WASM在跨平台兼容性和沙箱执行方面提供了可接受的权衡。结果表明,当可移植性和安全性超过严格的性能约束时,WASM是嵌入式物联网应用的可行选择,进一步的运行时优化可以扩展其在该领域的实用性。
英文摘要:
The increasing heterogeneity of hardware and software in the Internet of Things (IoT) poses a major challenge for the portability, maintainability and deployment of software on devices with limited resources. WebAssembly (WASM), originally designed for the web, is increasingly recognized as a portable, secure and efficient runtime environment that can overcome these challenges. This paper explores the feasibility of using WASM in embedded IoT systems by evaluating its performance, memory footprint and energy consumption on three representative microcontrollers: the Raspberry Pi Pico, the ESP32 C6 and the nRF5340. Two lightweight WASM runtimes, WAMR and wasm3, are compared with the native C execution. The results show that while the native execution remains superior in terms of speed and energy efficiency, WASM offers acceptable trade-offs in return for cross-platform compatibility and sandbox execution. The results highlight that WASM is a viable option for embedded IoT applications when portability and security outweigh strict performance constraints, and that further runtime optimization could extend its practicality in this area.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。