{"id":457262,"date":"2025-04-24T15:01:14","date_gmt":"2025-04-24T15:01:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457262"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-04-24T15:01:14","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457262","title":{"rendered":"<span>WASM \u2014 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0448\u043b\u044f\u043f\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a \u043d\u0435 \u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0431\u0435\u0437\u0443\u043c\u0438\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 \u0432\u0430\u043c\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 JavaScript. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u0441 \u0447\u0435\u0433\u043e \u0432\u0434\u0440\u0443\u0433 \u0442\u0430\u043a\u0438\u0435 \u043c\u044b\u0441\u043b\u0438. \u042f \u0434\u0430\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e front-end \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u0438 \u0447\u0430\u0449\u0435 \u044f \u0441\u0442\u0430\u043b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u043b\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 3\u0434 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u043a\u043e\u0432.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432 &#8212; \u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435? \u041a\u0430\u043a \u0432\u0441\u0435 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0432\u043e\u0442 \u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0439\u043b\u0435\u0440 .<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0442\u043e \u0432\u043e\u0442 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e\u00a0 \u0438\u0445 \u0441\u043e\u0432\u0441\u0435\u043c \u043c\u0430\u043b\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 &#8212; WASM.<\/p>\n<p>WebAssembly (WASM) \u2014 \u044d\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445. \u041e\u043d\u0430 \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 JavaScript, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0433\u043e, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (C, C++, Rust \u0438 \u0434\u0440.) \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<h3>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/h3>\n<p>WebAssembly \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0438\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p><strong>2010-\u0435 \u0433\u043e\u0434\u044b<\/strong>: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e JavaScript \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 (\u0438\u0433\u0440\u044b, CAD, \u0432\u0438\u0434\u0435\u043e\u043c\u043e\u043d\u0442\u0430\u0436)<\/p>\n<\/li>\n<li>\n<p><strong>2013<\/strong>: Mozilla \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 asm.js &#8212; \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e JavaScript, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>2015<\/strong>: \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f W3C WebAssembly Community Group \u0441 \u0443\u0447\u0430\u0441\u0442\u0438\u0435\u043c Google, Microsoft, Mozilla \u0438 Apple<\/p>\n<\/li>\n<li>\n<p><strong>2017<\/strong>: \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f WebAssembly (MVP) \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445<\/p>\n<\/li>\n<li>\n<p><strong>2019<\/strong>: WebAssembly \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0435\u0431-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c W3C<\/p>\n<\/li>\n<li>\n<p><strong>2020-\u0435<\/strong>: \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 (\u043f\u043e\u0442\u043e\u043a\u0438, SIMD, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u0440.)<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebAssembly<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u00a0 \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438,\u00a0 \u043d\u043e \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u044f\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c.<\/p>\n<h4>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h4>\n<ol>\n<li>\n<p><strong>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong>: \u041a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043d\u0430 C\/C++, Rust, Go \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0432 WASM<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/strong>: \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 .wasm \u0444\u0430\u0439\u043b (\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442)<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong>: \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 .wasm \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 JavaScript API<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/strong>: \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 WASM \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/strong>: \u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/li>\n<\/ol>\n<h4>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0435\u043a\u043e\u0432\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430<\/strong>: WASM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0435\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u0430 \u043d\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432\u0443\u044e)<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 i32, i64, f32, f64<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c<\/strong>: \u041e\u0434\u0438\u043d \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 JS<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u044b<\/strong>: \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/strong>: \u041c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043b\u044e\u0441\u044b WebAssembly<\/h3>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0411\u043b\u0438\u0437\u043a\u0430\u044f \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u043d\u0435\u0442 JIT-\u043f\u0430\u0443\u0437 \u043a\u0430\u043a \u0432 JS)<\/p>\n<\/li>\n<li>\n<p>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 CPU (SIMD, \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u0438\u043d \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u043c\u044f\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a DOM\/API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u042f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u044f\u0437\u044b\u043a\u043e\u0432 (C\/C++, Rust, Go, Kotlin \u0438 \u0434\u0440.)<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u0432\u0435\u0431 \u00a0(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, OpenCV, SQLite)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u041c\u0438\u043d\u0443\u0441\u044b WebAssembly<\/h3>\n<ol>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c JavaScript<\/p>\n<\/li>\n<li>\n<p>Source maps \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u044b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u043e\u0432<\/strong>:<\/p>\n<ul>\n<li>\n<p>.wasm \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a Web API<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a DOM<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 JavaScript<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u043b\u043e\u0434\u043e\u0441\u0442\u044c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0438\u0447\u0438 \u0435\u0449\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 JS<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 JavaScript<\/h3>\n<p>\u041f\u043e \u0441\u0435\u0431\u0435 \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043a\u043e\u0434, \u0447\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u043e \u0440\u0430\u0437 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h4>1. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h4>\n<p><code><em>\/\/ \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f WASM \u043c\u043e\u0434\u0443\u043b\u044f<\/em><\/code><\/p>\n<p><code>WebAssembly.instantiateStreaming(fetch('library.wasm'), importObject)<\/code><\/p>\n<p><code>\u00a0\u00a0.then(obj =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0<em>\/\/ \u0412\u044b\u0437\u043e\u0432 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0const result = obj.instance.exports.computeSomething(42);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0console.log(result);<\/code><\/p>\n<p><code>\u00a0\u00a0});<\/code><\/p>\n<h4>2. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439:<\/p>\n<p><code>async function processImageWasm(imageData) {<\/code><\/p>\n<p><code>\u00a0\u00a0const wasmModule = await WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0fetch('image_processor.wasm')<\/code><\/p>\n<p><code>\u00a0\u00a0);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0const memory = wasmModule.instance.exports.memory;<\/code><\/p>\n<p><code>\u00a0\u00a0const uint8View = new Uint8Array(memory.buffer);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c WASM<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0uint8View.set(imageData, 0);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0wasmModule.instance.exports.processImage(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0imageData.width,\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0imageData.height<\/code><\/p>\n<p><code>\u00a0\u00a0);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0return uint8View.slice(0, imageData.length);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p>3. \u0418\u0433\u0440\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<p><code><em>\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430<\/em><\/code><\/p>\n<p><code>const game = await WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0fetch('game_engine.wasm'),<\/code><\/p>\n<p><code>\u00a0\u00a0{<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0env: {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<em>\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 JS<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0drawSprite: (x, y, spriteId) =&gt; { <em>\/* ... *\/<\/em> },<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0playSound: (soundId) =&gt; { <em>\/* ... *\/<\/em> }<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0}<\/code><\/p>\n<p><code>\u00a0\u00a0}<\/code><\/p>\n<p><code>);<\/code><\/p>\n<p><code><em>\/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b<\/em><\/code><\/p>\n<p><code>function gameLoop() {<\/code><\/p>\n<p><code>\u00a0\u00a0game.instance.exports.update();<\/code><\/p>\n<p><code>\u00a0\u00a0game.instance.exports.render();<\/code><\/p>\n<p><code>\u00a0\u00a0requestAnimationFrame(gameLoop);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<h4>4. \u041c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0439\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0430\u0443\u0434\u0438\u043e\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<p><code>const audioContext = new AudioContext();<\/code><\/p>\n<p><code>const processor = audioContext.createScriptProcessor(4096, 1, 1);<\/code><\/p>\n<p><code>let wasmAudioProcessor;<\/code><\/p>\n<p><code><em>\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f WASM \u043c\u043e\u0434\u0443\u043b\u044f<\/em><\/code><\/p>\n<p><code>WebAssembly.instantiateStreaming(fetch('audio_processor.wasm'))<\/code><\/p>\n<p><code>\u00a0\u00a0.then(({instance}) =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0wasmAudioProcessor = instance.exports;<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0processor.onaudioprocess = (e) =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const input = e.inputBuffer.getChannelData(0);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const output = e.outputBuffer.getChannelData(0);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<em>\/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u0443\u0434\u0438\u043e \u0432 WASM<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0wasmAudioProcessor.process(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0input.byteOffset,<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0output.byteOffset,<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0input.length<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0};<\/code><\/p>\n<p><code>\u00a0\u00a0});<\/code><\/p>\n<h3>\u041d\u044e\u0430\u043d\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f\u00a0 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>1. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 JavaScript<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/strong>: \u0427\u0430\u0441\u0442\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043c\u0435\u0436\u0434\u0443 JS \u0438 WASM \u043c\u043e\u0433\u0443\u0442 \u0441\u043d\u0438\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0414\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/strong>: WASM \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b, \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/h4>\n<ul>\n<li>\n<p><strong>\u0420\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong>: \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 (\u043a\u0440\u043e\u043c\u0435 Rust) \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/p>\n<\/li>\n<li>\n<p><strong>Memory growth<\/strong>: \u041f\u0430\u043c\u044f\u0442\u044c \u0432 WASM \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0442\u0438, \u043d\u043e \u043d\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c\u0441\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438<\/strong>: \u041b\u0435\u0433\u043a\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 JS<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e:<\/p>\n<p><code>const wasmModule = await WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0fetch('module.wasm')<\/code><\/p>\n<p><code>);<\/code><\/p>\n<p><code><em>\/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c WASM<\/em><\/code><\/p>\n<p><code>const memory = wasmModule.instance.exports.memory;<\/code><\/p>\n<p><code><em>\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c view \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/em><\/code><\/p>\n<p><code>const memoryView = new Uint8Array(memory.buffer);<\/code><\/p>\n<p><code><em>\/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c WASM<\/em><\/code><\/p>\n<p><code>const str = \"Hello WASM!\";<\/code><\/p>\n<p><code>const strPtr = wasmModule.instance.exports.allocate_string(str.length);<\/code><\/p>\n<p><code>for (let i = 0; i &lt; str.length; i++) {<\/code><\/p>\n<p><code>\u00a0\u00a0memoryView[strPtr + i] = str.charCodeAt(i);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code><em>\/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e WASM<\/em><\/code><\/p>\n<p><code>wasmModule.instance.exports.process_string(strPtr, str.length);<\/code><\/p>\n<p><code><em>\/\/ \u041e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c<\/em><\/code><\/p>\n<p><a href=\"http:\/\/wasmModule.instance.exports.free\" rel=\"noopener noreferrer nofollow\"><code>wasmModule.instance.exports.free<\/code><\/a><code>_string(strPtr);<\/code><\/p>\n<h4>3. \u041e\u0442\u043b\u0430\u0434\u043a\u0430<\/h4>\n<ul>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/strong>: Chrome DevTools \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 WASM, \u043d\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/p>\n<\/li>\n<li>\n<p><strong>Source maps<\/strong>: \u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432<\/strong>: \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<h4>4. \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/h4>\n<ul>\n<li>\n<p><strong>\u041f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430<\/strong>: WASM \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435, \u043d\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0430\u0442\u0430\u043a\u0438<\/strong>: \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u043a\u043e\u0434\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p><strong>Side-channel \u0430\u0442\u0430\u043a\u0438<\/strong>: \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b Spectre-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0430\u0442\u0430\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>5. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<ul>\n<li>\n<p><strong>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/strong>: \u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>: .wasm \u0444\u0430\u0439\u043b\u044b \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><strong>Lazy compilation<\/strong>: \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<p><code><em>\/\/ \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/em><\/code><\/p>\n<p><code>let wasmModulePromise;<\/code><\/p>\n<p><code>function preloadWasm() {<\/code><\/p>\n<p><code>\u00a0\u00a0wasmModulePromise = WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0fetch('module.wasm'),<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0importObject<\/code><\/p>\n<p><code>\u00a0\u00a0).catch(err =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0console.error('WASM preload failed:', err);<\/code><\/p>\n<p><code>\u00a0\u00a0});<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code><em>\/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/em><\/code><\/p>\n<p><code>async function useWasm() {<\/code><\/p>\n<p><code>\u00a0\u00a0const wasmModule = await wasmModulePromise;<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ ...<\/em><\/code><\/p>\n<p><code>}<\/code><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>WebAssembly &#8212; \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 C++\/Rust \u0432 \u0432\u0435\u0431<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u0438\u0433\u0440\u044b, CAD, \u0432\u0438\u0434\u0435\u043e\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b)<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 JavaScript \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u0432\u0435\u0431-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439. \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WebAssembly \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 JavaScript &#8212; \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e.WASM &#8212; \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0448\u043b\u044f\u043f\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a \u043d\u0435 \u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0431\u0435\u0437\u0443\u043c\u0438\u0435 &#8212; 2<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/904102\/\"> https:\/\/habr.com\/ru\/articles\/904102\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 \u0432\u0430\u043c\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 JavaScript. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u0441 \u0447\u0435\u0433\u043e \u0432\u0434\u0440\u0443\u0433 \u0442\u0430\u043a\u0438\u0435 \u043c\u044b\u0441\u043b\u0438. \u042f \u0434\u0430\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e front-end \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u0438 \u0447\u0430\u0449\u0435 \u044f \u0441\u0442\u0430\u043b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u043b\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 3\u0434 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u043a\u043e\u0432.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432 &#8212; \u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435? \u041a\u0430\u043a \u0432\u0441\u0435 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0432\u043e\u0442 \u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0439\u043b\u0435\u0440 .<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0442\u043e \u0432\u043e\u0442 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e\u00a0 \u0438\u0445 \u0441\u043e\u0432\u0441\u0435\u043c \u043c\u0430\u043b\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 &#8212; WASM.<\/p>\n<p>WebAssembly (WASM) \u2014 \u044d\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445. \u041e\u043d\u0430 \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 JavaScript, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0433\u043e, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (C, C++, Rust \u0438 \u0434\u0440.) \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<h3>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/h3>\n<p>WebAssembly \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0438\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p><strong>2010-\u0435 \u0433\u043e\u0434\u044b<\/strong>: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e JavaScript \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 (\u0438\u0433\u0440\u044b, CAD, \u0432\u0438\u0434\u0435\u043e\u043c\u043e\u043d\u0442\u0430\u0436)<\/p>\n<\/li>\n<li>\n<p><strong>2013<\/strong>: Mozilla \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 asm.js &#8212; \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e JavaScript, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>2015<\/strong>: \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f W3C WebAssembly Community Group \u0441 \u0443\u0447\u0430\u0441\u0442\u0438\u0435\u043c Google, Microsoft, Mozilla \u0438 Apple<\/p>\n<\/li>\n<li>\n<p><strong>2017<\/strong>: \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f WebAssembly (MVP) \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445<\/p>\n<\/li>\n<li>\n<p><strong>2019<\/strong>: WebAssembly \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0435\u0431-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c W3C<\/p>\n<\/li>\n<li>\n<p><strong>2020-\u0435<\/strong>: \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 (\u043f\u043e\u0442\u043e\u043a\u0438, SIMD, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0434\u0440.)<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 WebAssembly<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u00a0 \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438,\u00a0 \u043d\u043e \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u044f\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c.<\/p>\n<h4>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h4>\n<ol>\n<li>\n<p><strong>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong>: \u041a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043d\u0430 C\/C++, Rust, Go \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0432 WASM<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/strong>: \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 .wasm \u0444\u0430\u0439\u043b (\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442)<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong>: \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 .wasm \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 JavaScript API<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/strong>: \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 WASM \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/strong>: \u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/li>\n<\/ol>\n<h4>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u0442\u0435\u043a\u043e\u0432\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430<\/strong>: WASM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0435\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u0430 \u043d\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432\u0443\u044e)<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 i32, i64, f32, f64<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c<\/strong>: \u041e\u0434\u0438\u043d \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 JS<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u044b<\/strong>: \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/strong>: \u041c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043b\u044e\u0441\u044b WebAssembly<\/h3>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0411\u043b\u0438\u0437\u043a\u0430\u044f \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u043d\u0435\u0442 JIT-\u043f\u0430\u0443\u0437 \u043a\u0430\u043a \u0432 JS)<\/p>\n<\/li>\n<li>\n<p>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 CPU (SIMD, \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u0438\u043d \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u043c\u044f\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a DOM\/API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u042f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u044f\u0437\u044b\u043a\u043e\u0432 (C\/C++, Rust, Go, Kotlin \u0438 \u0434\u0440.)<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u0432\u0435\u0431 \u00a0(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, OpenCV, SQLite)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u041c\u0438\u043d\u0443\u0441\u044b WebAssembly<\/h3>\n<ol>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c JavaScript<\/p>\n<\/li>\n<li>\n<p>Source maps \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u044b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u043e\u0432<\/strong>:<\/p>\n<ul>\n<li>\n<p>.wasm \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a Web API<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a DOM<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 JavaScript<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u043b\u043e\u0434\u043e\u0441\u0442\u044c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0438\u0447\u0438 \u0435\u0449\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 JS<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 JavaScript<\/h3>\n<p>\u041f\u043e \u0441\u0435\u0431\u0435 \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043a\u043e\u0434, \u0447\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u043e \u0440\u0430\u0437 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h4>1. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h4>\n<p><code><em>\/\/ \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f WASM \u043c\u043e\u0434\u0443\u043b\u044f<\/em><\/code><\/p>\n<p><code>WebAssembly.instantiateStreaming(fetch('library.wasm'), importObject)<\/code><\/p>\n<p><code>\u00a0\u00a0.then(obj =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0<em>\/\/ \u0412\u044b\u0437\u043e\u0432 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0const result = obj.instance.exports.computeSomething(42);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0console.log(result);<\/code><\/p>\n<p><code>\u00a0\u00a0});<\/code><\/p>\n<h4>2. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439:<\/p>\n<p><code>async function processImageWasm(imageData) {<\/code><\/p>\n<p><code>\u00a0\u00a0const wasmModule = await WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0fetch('image_processor.wasm')<\/code><\/p>\n<p><code>\u00a0\u00a0);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0const memory = wasmModule.instance.exports.memory;<\/code><\/p>\n<p><code>\u00a0\u00a0const uint8View = new Uint8Array(memory.buffer);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c WASM<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0uint8View.set(imageData, 0);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0wasmModule.instance.exports.processImage(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0imageData.width,\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0imageData.height<\/code><\/p>\n<p><code>\u00a0\u00a0);<\/code><\/p>\n<p><code>\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0return uint8View.slice(0, imageData.length);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p>3. \u0418\u0433\u0440\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<p><code><em>\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430<\/em><\/code><\/p>\n<p><code>const game = await WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0fetch('game_engine.wasm'),<\/code><\/p>\n<p><code>\u00a0\u00a0{<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0env: {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<em>\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 JS<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0drawSprite: (x, y, spriteId) =&gt; { <em>\/* ... *\/<\/em> },<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0playSound: (soundId) =&gt; { <em>\/* ... *\/<\/em> }<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0}<\/code><\/p>\n<p><code>\u00a0\u00a0}<\/code><\/p>\n<p><code>);<\/code><\/p>\n<p><code><em>\/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b<\/em><\/code><\/p>\n<p><code>function gameLoop() {<\/code><\/p>\n<p><code>\u00a0\u00a0game.instance.exports.update();<\/code><\/p>\n<p><code>\u00a0\u00a0game.instance.exports.render();<\/code><\/p>\n<p><code>\u00a0\u00a0requestAnimationFrame(gameLoop);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<h4>4. \u041c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0439\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0430\u0443\u0434\u0438\u043e\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<p><code>const audioContext = new AudioContext();<\/code><\/p>\n<p><code>const processor = audioContext.createScriptProcessor(4096, 1, 1);<\/code><\/p>\n<p><code>let wasmAudioProcessor;<\/code><\/p>\n<p><code><em>\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f WASM \u043c\u043e\u0434\u0443\u043b\u044f<\/em><\/code><\/p>\n<p><code>WebAssembly.instantiateStreaming(fetch('audio_processor.wasm'))<\/code><\/p>\n<p><code>\u00a0\u00a0.then(({instance}) =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0wasmAudioProcessor = instance.exports;<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0processor.onaudioprocess = (e) =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const input = e.inputBuffer.getChannelData(0);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const output = e.outputBuffer.getChannelData(0);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<em>\/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u0443\u0434\u0438\u043e \u0432 WASM<\/em><\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0wasmAudioProcessor.process(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0input.byteOffset,<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0output.byteOffset,<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0input.length<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0};<\/code><\/p>\n<p><code>\u00a0\u00a0});<\/code><\/p>\n<h3>\u041d\u044e\u0430\u043d\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f\u00a0 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>1. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 JavaScript<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/strong>: \u0427\u0430\u0441\u0442\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043c\u0435\u0436\u0434\u0443 JS \u0438 WASM \u043c\u043e\u0433\u0443\u0442 \u0441\u043d\u0438\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0414\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/strong>: WASM \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b, \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/h4>\n<ul>\n<li>\n<p><strong>\u0420\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong>: \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 (\u043a\u0440\u043e\u043c\u0435 Rust) \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/p>\n<\/li>\n<li>\n<p><strong>Memory growth<\/strong>: \u041f\u0430\u043c\u044f\u0442\u044c \u0432 WASM \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0442\u0438, \u043d\u043e \u043d\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c\u0441\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438<\/strong>: \u041b\u0435\u0433\u043a\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 JS<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e:<\/p>\n<p><code>const wasmModule = await WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0fetch('module.wasm')<\/code><\/p>\n<p><code>);<\/code><\/p>\n<p><code><em>\/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c WASM<\/em><\/code><\/p>\n<p><code>const memory = wasmModule.instance.exports.memory;<\/code><\/p>\n<p><code><em>\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c view \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/em><\/code><\/p>\n<p><code>const memoryView = new Uint8Array(memory.buffer);<\/code><\/p>\n<p><code><em>\/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c WASM<\/em><\/code><\/p>\n<p><code>const str = \"Hello WASM!\";<\/code><\/p>\n<p><code>const strPtr = wasmModule.instance.exports.allocate_string(str.length);<\/code><\/p>\n<p><code>for (let i = 0; i &lt; str.length; i++) {<\/code><\/p>\n<p><code>\u00a0\u00a0memoryView[strPtr + i] = str.charCodeAt(i);<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code><em>\/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e WASM<\/em><\/code><\/p>\n<p><code>wasmModule.instance.exports.process_string(strPtr, str.length);<\/code><\/p>\n<p><code><em>\/\/ \u041e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c<\/em><\/code><\/p>\n<p><a href=\"http:\/\/wasmModule.instance.exports.free\" rel=\"noopener noreferrer nofollow\"><code>wasmModule.instance.exports.free<\/code><\/a><code>_string(strPtr);<\/code><\/p>\n<h4>3. \u041e\u0442\u043b\u0430\u0434\u043a\u0430<\/h4>\n<ul>\n<li>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/strong>: Chrome DevTools \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 WASM, \u043d\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/p>\n<\/li>\n<li>\n<p><strong>Source maps<\/strong>: \u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432<\/strong>: \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<h4>4. \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/h4>\n<ul>\n<li>\n<p><strong>\u041f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430<\/strong>: WASM \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435, \u043d\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0430\u0442\u0430\u043a\u0438<\/strong>: \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u043a\u043e\u0434\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p><strong>Side-channel \u0430\u0442\u0430\u043a\u0438<\/strong>: \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b Spectre-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0430\u0442\u0430\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>5. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<ul>\n<li>\n<p><strong>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/strong>: \u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>: .wasm \u0444\u0430\u0439\u043b\u044b \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><strong>Lazy compilation<\/strong>: \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<p><code><em>\/\/ \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/em><\/code><\/p>\n<p><code>let wasmModulePromise;<\/code><\/p>\n<p><code>function preloadWasm() {<\/code><\/p>\n<p><code>\u00a0\u00a0wasmModulePromise = WebAssembly.instantiateStreaming(<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0fetch('module.wasm'),<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0importObject<\/code><\/p>\n<p><code>\u00a0\u00a0).catch(err =&gt; {<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0\u00a0console.error('WASM preload failed:', err);<\/code><\/p>\n<p><code>\u00a0\u00a0});<\/code><\/p>\n<p><code>}<\/code><\/p>\n<p><code><em>\/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/em><\/code><\/p>\n<p><code>async function useWasm() {<\/code><\/p>\n<p><code>\u00a0\u00a0const wasmModule = await wasmModulePromise;<\/code><\/p>\n<p><code>\u00a0\u00a0<em>\/\/ ...<\/em><\/code><\/p>\n<p><code>}<\/code><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>WebAssembly &#8212; \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 C++\/Rust \u0432 \u0432\u0435\u0431<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u0438\u0433\u0440\u044b, CAD, \u0432\u0438\u0434\u0435\u043e\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b)<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 JavaScript \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u0432\u0435\u0431-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439. \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WebAssembly \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 JavaScript &#8212; \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e.WASM &#8212; \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0448\u043b\u044f\u043f\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a \u043d\u0435 \u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0431\u0435\u0437\u0443\u043c\u0438\u0435 &#8212; 2<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/904102\/\"> https:\/\/habr.com\/ru\/articles\/904102\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-457262","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457262"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457262\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}