WebAssembly(WASM)是一项 W3C 标准,旨在为浏览器提供执行代码的能力。它是二进制的编码格式,其设计目标是可以发挥硬件的能力,让代码以接近原生的速度在浏览器中运行,目前 WASM 已被所有的主流浏览器支持并向下兼容。前端开发编程语言早期主要聚焦在 C、C++ 以及 Rust 上,WASM 的出现拓宽了可选范围。同时 WASM 还被 LLVM 支持,纳入为一个编译目标。当 WASM 在浏览器的沙盒环境中运行时,能够与 JavaScript 交互并共享相同的权限和安全模型。凭借其可移植性和安全性这两项关键能力,WASM 可以适配包括移动端、IoT 在内的更多平台。
WebAssembly is a big step forward in the capabilities of the browser as a code execution environment. Supported by all major browsers and backward compatible, it's a binary compilation format designed to run in the browser at near native speeds. It opens up the range of languages you can use to write front-end functionality, with early focus on C, C++ and Rust, and it's also an LLVM compilation target. When run in the sandbox, it can interact with JavaScript and shares the same permissions and security model. When used with Firefox's new streaming compiler, it also results in faster page initialization. Although it's still early days, this W3C standard is definitely one to start exploring.
WebAssembly is a big step forward in the capabilities of the browser as a code execution environment. Supported by all major browsers and backward compatible, it's a binary compilation format designed to run in the browser at near native speeds. It opens up the range of languages you can use to write front-end functionality, with early focus on C, C++ and Rust, and it's also an LLVM compilation target. When run in the sandbox, it can interact with JavaScript and shares the same permissions and security model. When used with Firefox’s new streaming compiler, it also results in faster page initialization. Although it's still early days, this W3C standard is definitely one to start exploring.