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

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.

主站蜘蛛池模板: 永川市| 广汉市| 连江县| 吉林市| 城固县| 永年县| 平远县| 攀枝花市| 合肥市| 上饶市| 彝良县| 桂平市| 永德县| 尖扎县| 扎兰屯市| 松阳县| 壶关县| 昭苏县| 永靖县| 堆龙德庆县| 南皮县| 宝鸡市| 禄丰县| 郧西县| 武陟县| 寿光市| 孝感市| 鸡东县| 房产| 贵港市| 启东市| 平谷区| 南木林县| 乐陵市| 黑龙江省| 和平区| 九江县| 边坝县| 鄂托克前旗| 司法| 临清市|