官术网_书友最值得收藏!

Wasm

Wasm, which WebAssembly is now commonly called, is a binary format meant to complement JavaScript that Rust can be compiled to. The format is designed to run as a stack machine inside several sandboxed execution environments (such as web browsers, or the Node.js runtime) for performance-critical applications (https://blog.x5ff.xyz/blog/azure-functions-wasm-rust/). While this is—as of this writing—in its early stages, Rust and the Wasm target have been used in real-time frontend settings (such as browser games), and in 2018 there was a dedicated working group seeking to improve this integration.

Similar to other targets, such as ARM, the Wasm target is an LLVM (the compiler technology Rust is built on) backend so it has to be installed using rustup target add wasm32-unknown-unknown. Furthermore, it isn't necessary to declare the binary layout (the "C" in extern "C") and a different bindgen tool does the rest: wasm-bindgen, available at https://github.com/rustwasm/wasm-bindgen. We highly recommend reading the documentation for more information.

主站蜘蛛池模板: 曲阜市| 富川| 青海省| 盖州市| 梧州市| 沙雅县| 双桥区| 定襄县| 紫云| 呼和浩特市| 吉首市| 镇平县| 棋牌| 江门市| 霍林郭勒市| 措美县| 五大连池市| 乌鲁木齐县| 安顺市| 南皮县| 永清县| 望城县| 东平县| 油尖旺区| 光山县| 泌阳县| 遵化市| 涡阳县| 普格县| 增城市| 哈密市| 田林县| 宁国市| 紫金县| 固原市| 南召县| 峨山| 平泉县| 修水县| 汽车| 泰和县|