{"id":1960,"date":"2017-09-08T14:49:15","date_gmt":"2017-09-08T06:49:15","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1960"},"modified":"2017-09-08T14:49:15","modified_gmt":"2017-09-08T06:49:15","slug":"%e6%b5%85%e8%b0%88-webassembly-%e5%af%b9-web-%e5%8f%91%e5%b1%95%e7%9a%84%e5%bd%b1%e5%93%8d","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1960","title":{"rendered":"\u6d45\u8c08 WebAssembly \u5bf9 Web \u53d1\u5c55\u7684\u5f71\u54cd"},"content":{"rendered":"<p>\n\t\u5982\u679c\u4f60\u8fd8\u6ca1\u542c\u8fc7&nbsp;<a href=\"https:\/\/www.xttblog.com\/?tag=WebAssembly\" name=\"WebAssembly\" target=\"_blank\" title=\"WebAssembly\">WebAssembly<\/a> \uff0c\u90a3\u4e48\u6211\u5efa\u8bae\u4f60\u53bb\u8bfb\u4e00\u4e0b&nbsp;<a href=\"https:\/\/www.xttblog.com\/?p=1958\" name=\"WebAssembly \u7b80\u4ecb\" target=\"_blank\" title=\"WebAssembly \u7b80\u4ecb\">WebAssembly \u7b80\u4ecb<\/a>\u3002\n<\/p>\n<p>\n\tWebAssembly&nbsp;\u662f\u7531Google, Microsoft, Mozilla\uff0cApple\u7b49\u51e0\u5bb6\u5927\u516c\u53f8\u5408\u4f5c\u53d1\u8d77\u7684\u4e00\u4e2a\u5173\u4e8e\u9762\u5411Web\u7684\u901a\u7528\u4e8c\u8fdb\u5236\u548c\u6587\u672c\u683c\u5f0f\u7684\u9879\u76ee\u3002\n<\/p>\n<p>\n\t\u6211\u4e2a\u4eba\u9884\u6d4b&nbsp;WebAssembly&nbsp;\u81f3\u5c11\u5728\u67d0\u79cd\u7a0b\u5ea6\u4e0a\uff0c\u5b83\u5c06\u6539\u53d8Web\u751f\u6001\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\u5404\u6d4f\u89c8\u5668 WebAssembly \u7684\u8fd0\u884c\u901f\u5ea6\u5bf9\u6bd4\" src=\"http:\/\/img.bbs.csdn.net\/upload\/201709\/08\/1504852173_914728.jpg\" style=\"width: 640px;height: 294px\" \/>\n<\/p>\n<p>\n\t\u4e0a\u56fe\u662f&nbsp;WebAssembly \u5728\u5404\u4e3b\u6d41\u6d4f\u89c8\u5668\u7684\u8fd0\u884c\u901f\u5ea6\u5bf9\u6bd4\u3002\u53ef\u4ee5\u770b\u51fa&nbsp;WebAssembly \u7684\u8fd0\u884c\u901f\u5ea6\u548c <a href=\"https:\/\/www.xttblog.com\/?tag=javascript\" name=\"javascript\" target=\"_blank\" title=\"javascript\">JavaScript<\/a> \u76f8\u5dee\u4e0d\u5927\u3002\n<\/p>\n<p>\n\t\u4ece\u4eca\u7684&nbsp;JavaScript \u662f Web \u4e16\u754c\u7684\u6c47\u7f16\u8bed\u8a00\uff0c\u7136\u800c\u6211\u76f8\u4fe1\u5b83\u5728\u4e0d\u4e45\u7684\u5c06\u6765\u4f1a\u548c WebAssembly \u5e76\u5b58\u3002\u8fd9\u5e76\u4e0d\u610f\u5473\u7740WebAssmbly\u662f\u4e3a\u4e86\u53d6\u4ee3 JavaScript\u800c\u751f\u3002\n<\/p>\n<p>\n\t\u8fc7\u53bb\u51e0\u5e74\uff0c\u6211\u4eec\u770b\u5230\u8d8a\u6765\u8d8a\u591a\u7684\u9879\u76ee\u95ee\u4e16\uff0c\u5b83\u4eec\u8bd5\u56fe\u901a\u8fc7\u5f00\u53d1\u7f16\u8bd1\u7a0b\u5e8f\uff0c\u5c06\u5176\u4ed6\u8bed\u8a00\u4ee3\u7801\u8f6c\u5316\u4e3a JavaScript\uff0c\u4ee5\u6b64\u8ba9\u5f00\u53d1\u8005\u514b\u670d JavaScript\u81ea\u8eab\u5b58\u5728\u7684\u4e00\u4e9b\u77ed\u677f\u3002\u5176\u4e2d\u4e00\u4e9b\u9879\u76ee\u4e13\u6ce8\u4e8e\u7ed9\u7f16\u7a0b\u8bed\u8a00\u589e\u52a0\u65b0\u7684\u529f\u80fd\uff0c\u6bd4\u5982\u5fae\u8f6f\u7684&nbsp;<a href=\"http:\/\/www.typescriptlang.org\/\" target=\"_blank\">TypeScript<\/a>\u548cGoogle\u7684<a href=\"http:\/\/www.typescriptlang.org\/\" target=\"_blank\">Dart<\/a>\uff0c\u6216\u662f\u52a0\u5feb JavaScript\u7684\u6267\u884c\u901f\u5ea6\uff0c\u4f8b\u5982 Mozilla \u7684&nbsp;<a href=\"http:\/\/asmjs.org\/\" target=\"_blank\">asm.js<\/a>&nbsp;\u9879\u76ee\u548cGoogle\u7684<a href=\"http:\/\/johmathe.nonutc.fr\/ressources\/nacl_paper.pdf\" target=\"_blank\">PNaCI<\/a>\u3002\n<\/p>\n<p>\n\tWebAssembly \u662f\u4e00\u79cd\u65b0\u7684\u5b57\u8282\u7801\u683c\u5f0f\u3002\u5b83\u7684\u7f29\u5199\u662f&quot;.wasm&quot;\uff0c.wasm \u4e3a\u6587\u4ef6\u540d\u540e\u7f00\uff0c\u662f\u4e00\u79cd\u65b0\u7684\u5e95\u5c42\u5b89\u5168\u7684\u4e8c\u8fdb\u5236\u8bed\u6cd5\u3002\u5b83\u88ab\u5b9a\u4e49\u4e3a&ldquo;\u7cbe\u7b80\u3001\u52a0\u8f7d\u65f6\u95f4\u77ed\u7684\u683c\u5f0f\u548c\u6267\u884c\u6a21\u578b&rdquo;\uff0c\u5e76\u4e14\u88ab\u8bbe\u8ba1\u4e3a Web \u591a\u7f16\u7a0b\u8bed\u8a00\u76ee\u6807\u6587\u4ef6\u683c\u5f0f\u3002 \u8fd9\u610f\u5473\u7740\u6d4f\u89c8\u5668\u7aef\u7684\u6027\u80fd\u4f1a\u5f97\u5230\u6781\u5927\u63d0\u5347\uff0c\u5b83\u4e5f\u4f7f\u5f97\u6211\u4eec\u80fd\u591f\u5b9e\u73b0\u4e00\u4e2a\u5e95\u5c42\u6784\u5efa\u6a21\u5757\u7684\u96c6\u5408\uff0c\u4f8b\u5982\uff0c\u5f3a\u7c7b\u578b\u548c\u5757\u7ea7\u4f5c\u7528\u57df\u3002\n<\/p>\n<p>\n\t\u6700\u597d\u4e0d\u8981\u628aWebAssembly\u4ec5\u4ec5\u5f53\u505a\u4e00\u95e8\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b9e\u9645\u4e0a\u5b83\u66f4\u50cf\u662f\u4e00\u4e2a\u7f16\u8bd1\u5668\u3002\n<\/p>\n<p>\n\t\u6700\u8fd1\u6211\u770b\u5230\u4e86\u962e\u4e00\u5cf0\u5728\u5199\u300a<a href=\"http:\/\/www.ruanyifeng.com\/blog\/2017\/09\/asmjs_emscripten.html\" name=\"asm.js \u548c Emscripten \u5165\u95e8\u6559\u7a0b\" target=\"_blank\" title=\"asm.js \u548c Emscripten \u5165\u95e8\u6559\u7a0b\">asm.js \u548c Emscripten \u5165\u95e8\u6559\u7a0b<\/a>\u300b\u3002\u4e2a\u4eba\u8ba4\u4e3a&nbsp;webassembly \u76f8\u8f83\u4e8e asm.js \u7684\u4f18\u52bf\u4e3b\u8981\u662f\u6d89\u53ca\u5230\u6027\u80fd\u65b9\u9762\u3002\u6839\u636e&nbsp;<a href=\"https:\/\/github.com\/WebAssembly\/design\/blob\/master\/FAQ.md#why-create-a-new-standard-when-there-is-already-asmjs\" target=\"_blank\">WebAssembly FAQ<\/a>&nbsp;\u7684\u63cf\u8ff0\uff1a\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\uff0c\u5bf9\u4e8e\u5f88\u5927\u7684\u4ee3\u7801\u5e93\uff0casm.js \u4ec5\u4ec5\u89e3\u6790\u5c31\u9700\u8981\u82b1\u8d3920-40\u79d2\uff0c\u800c<a href=\"https:\/\/github.com\/WebAssembly\/design\/blob\/master\/BinaryEncoding.md#why-a-binary-encoding-instead-of-a-text-only-representation\" target=\"_blank\">\u5b9e\u9a8c<\/a>\u663e\u793a WebAssembly \u7684\u52a0\u8f7d\u901f\u5ea6 \u6bd4 asm.js \u5feb\u4e8620\u500d\uff0c\u8fd9\u4e3b\u8981\u662f\u56e0\u4e3a\u76f8\u6bd4\u89e3\u6790 asm.js \u4ee3\u7801\uff0cJavaScript \u5f15\u64ce\u7834\u8bd1\u4e8c\u8fdb\u5236\u683c\u5f0f\u7684\u901f\u5ea6\u8981\u5feb\u5f97\u591a\u3002\n<\/p>\n<p>\n\tWebAssembly\u5bf9\u4e8eJS\u6765\u8bf4\u7edd\u5bf9\u662f\u4e00\u4e2a\u5de8\u5927\u7684\u6539\u8fdb\u3002WebAssembly \u5bf9\u4e8e\u6d4f\u89c8\u5668\u6765\u8bf4\u4e5f\u6709\u7740\u975e\u540c\u4e00\u822c\u7684\u610f\u4e49\u3002 \u652f\u6301WebAssembly\u7684\u6d4f\u89c8\u5668\u53ef\u4ee5\u8bc6\u522b\u4e8c\u8fdb\u5236\u683c\u5f0f\u7684\u6587\u672c\uff0c\u5b83\u6709\u80fd\u529b\u7f16\u8bd1\u6bd4JS\u6587\u672c\u5c0f\u5f97\u591a\u7684\u4e8c\u8fdb\u5236\u5305\u3002 \u8fd9\u5c06\u7ed9web\u5e94\u7528\u5e26\u6765\u7c7b\u4f3c\u4e0e\u672c\u5730\u5e94\u7528\u7684\u6027\u80fd\u4f53\u9a8c\uff01\n<\/p>\n<p>\n\t\u5305\u62ec Google\uff0cMicrosoft\uff0cMozilla \u53ea\u662f\u8fd9\u4e00\u957f\u4e32\u540d\u5355\u4e2d\u7684\u5c11\u6570\u51e0\u5bb6\u516c\u53f8\u3002\u9879\u76ee\u5e26\u5934\u4eba\u4eec\u53d1\u8d77\u4e86<a href=\"https:\/\/www.w3.org\/community\/webassembly\/\" target=\"_blank\">WebAssembly Community Group<\/a>\u8fd9\u4e00\u793e\u533a\uff0c\u8fd9\u4e2a\u56e2\u961f\u7684\u613f\u666f\u662f&ldquo;\u5728\u4e00\u79cd\u65b0\u7684\uff0c\u8f7b\u91cf\u7684 web \u7f16\u7801\u683c\u5f0f\u7684\u57fa\u7840\u4e0a\uff0c\u4fc3\u8fdb\u6d4f\u89c8\u5668\u5382\u5546\u4eec\u7684\u5408\u4f5c.&rdquo; \u4e0d\u8fc7\uff0cWebAssembly \u9879\u76ee\u8fd8\u53ea\u662f\u521a\u521a\u542f\u52a8\uff0c\u867d\u7136\u5b83\u6709\u4e00\u4e2a\u7f8e\u5999\u7684\u5f00\u5934\uff0c\u4f46\u5728 WebAssembly \u6210\u4e3a\u4e00\u4e2a\u5927\u4f17\u8ba4\u53ef\u7684 web \u6807\u51c6\u4e4b\u524d\uff0c\u5b83\u8fd8\u6709\u5f88\u957f\u7684\u8def\u8981\u8d70\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1960\">\u6d45\u8c08 WebAssembly \u5bf9 Web \u53d1\u5c55\u7684\u5f71\u54cd<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4f60\u8fd8\u6ca1\u542c\u8fc7&nbsp;WebAssembly \uff0c\u90a3\u4e48\u6211\u5efa\u8bae\u4f60\u53bb\u8bfb\u4e00\u4e0b&nbsp;WebAssembly \u7b80 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1488,1106,1493],"class_list":["post-1960","post","type-post","status-publish","format-standard","hentry","category-html5","tag-asm-js","tag-javascript","tag-webassembly"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1960"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1960\/revisions"}],"predecessor-version":[{"id":1961,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1960\/revisions\/1961"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}