WebAssembly 的承诺与陷阱:来自工业界的视角
The Promise and Pitfalls of WebAssembly: Perspectives from the Industry
AI总结:
针对工业界实际采用的 WebAssembly 二进制文件,本文构建了迄今最大规模的数据集,从元数据、源语言、安全威胁等角度进行测量分析,并为开发者、维护者和研究者提供建议与最佳实践。
摘要:
由于 JavaScript 在 Web 应用中因性能和安全性问题受到批评,WebAssembly(Wasm)于 2017 年被提出,并被视为 JavaScript 的补充。凭借其紧凑的尺寸、接近原生的速度和可移植性等优势,Wasm 二进制文件逐渐被用作其他高级编程语言工业项目的编译目标,并负责浏览器中的计算密集型任务,例如 3D 图形渲染和视频解码。直观上,从不同角度(如元数据、与源编程语言的关系、安全威胁的存在以及实际用途)刻画实际采用的 Wasm 二进制文件,是深入研究 Wasm 生态系统的前提,并有助于其路线图的选择。然而,目前尚无工作对实际采用的 Wasm 二进制文件进行大规模测量研究。为填补这一空白,我们收集了据我们所知有史以来最大的数据集,并从工业界的视角刻画了它们的现状。根据参与社区的人员(即 Web 开发者、Wasm 维护者和研究人员)的不同角色,我们将研究发现相应地整理为针对他们的建议和最佳实践。我们相信这项工作能够为 Web 和 Wasm 的未来方向提供启示。
英文摘要:
As JavaScript has been criticized for performance and security issues in web applications, WebAssembly (Wasm) was proposed in 2017 and is regarded as the complementation for JavaScript. Due to its advantages like compact-size, native-like speed, and portability, Wasm binaries are gradually used as the compilation target for industrial projects in other high-level programming languages and are responsible for computation-intensive tasks in browsers, e.g., 3D graphic rendering and video decoding. Intuitively, characterizing in-the-wild adopted Wasm binaries from different perspectives, like their metadata, relation with source programming language, existence of security threats, and practical purpose, is the prerequisite before delving deeper into the Wasm ecosystem and beneficial to its roadmap selection. However, currently, there is no work that conducts a large-scale measurement study on in-the-wild adopted Wasm binaries. To fill this gap, we collect the largest-ever dataset to the best of our knowledge, and characterize the status quo of them from industry perspectives. According to the different roles of people engaging in the community, i.e., web developers, Wasm maintainers, and researchers, we reorganized our findings to suggestions and best practices for them accordingly. We believe this work can shed light on the future direction of the web and Wasm.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。