{"id":5736,"date":"2022-04-22T11:14:14","date_gmt":"2022-04-22T03:14:14","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=5736"},"modified":"2022-04-22T11:14:14","modified_gmt":"2022-04-22T03:14:14","slug":"%e4%bb%80%e4%b9%88%e6%98%af-webassemblywasm%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/5736","title":{"rendered":"\u4ec0\u4e48\u662f WebAssembly(wasm)\uff1f"},"content":{"rendered":"<div data-zop-question=\"{&quot;title&quot;:&quot;\u4ec0\u4e48\u662f WebAssembly(wasm)\uff1f&quot;,&quot;topics&quot;:[{&quot;name&quot;:&quot;\u4e92\u8054\u7f51&quot;,&quot;id&quot;:&quot;19550517&quot;},{&quot;name&quot;:&quot;\u524d\u7aef\u5f00\u53d1&quot;,&quot;id&quot;:&quot;19550901&quot;},{&quot;name&quot;:&quot;JavaScript&quot;,&quot;id&quot;:&quot;19552521&quot;},{&quot;name&quot;:&quot;\u7f16\u7a0b&quot;,&quot;id&quot;:&quot;19554298&quot;},{&quot;name&quot;:&quot;\u7f51\u9875&quot;,&quot;id&quot;:&quot;19571150&quot;}],&quot;id&quot;:304577684,&quot;isEditable&quot;:true}\">\n<div data-za-detail-view-path-module=\"QuestionDescription\" data-za-extra-module=\"{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Question&quot;,&quot;token&quot;:&quot;304577684&quot;}}}\">\n<div class=\"QuestionHeader\">\n<div class=\"QuestionHeader-content\">\n<div class=\"QuestionHeader-main\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"Question-main\">\n<div class=\"Question-mainColumn\">\n<div>\n<div id=\"QuestionAnswers-answers\" class=\"QuestionAnswers-answers\" data-zop-feedlistmap=\"0,0,1,0\" data-za-detail-view-path-module=\"ContentList\" data-za-extra-module=\"{}\">\n<div class=\"Card AnswersNavWrapper\">\n<div class=\"ListShortcut\">\n<div class=\"List\">\n<div>\n<div class=\"\" role=\"list\">\n<div class=\"List-item\" tabindex=\"0\">\n<div>\n<div class=\"ContentItem AnswerItem\" data-za-index=\"0\" data-zop=\"{&quot;authorName&quot;:&quot;windliang&quot;,&quot;itemId&quot;:1961085507,&quot;title&quot;:&quot;\u4ec0\u4e48\u662f WebAssembly(wasm)\uff1f&quot;,&quot;type&quot;:&quot;answer&quot;}\" data-za-detail-view-path-module=\"AnswerItem\" data-za-detail-view-path-index=\"0\" data-za-extra-module=\"{&quot;card&quot;:{&quot;has_image&quot;:false,&quot;has_video&quot;:false,&quot;content&quot;:{&quot;type&quot;:&quot;Answer&quot;,&quot;token&quot;:&quot;1961085507&quot;,&quot;upvote_num&quot;:66,&quot;comment_num&quot;:5,&quot;publish_timestamp&quot;:null,&quot;parent_token&quot;:&quot;304577684&quot;,&quot;author_member_hash_id&quot;:&quot;76bfee1be3ee81a8287a10f561faf9cf&quot;}}}\">\n<div class=\"ContentItem-meta\">\n<div class=\"css-1k5dpte\"><a href=\"https:\/\/www.zhihu.com\/question\/304577684\">\u539f\u6587\u5730\u5740<\/a><\/div>\n<div><\/div>\n<\/div>\n<div class=\"RichContent RichContent--unescapable\">\n<div class=\"RichContent-inner\">\n<p data-first-child=\"\" data-pid=\"6ebSRPoE\">\u4e4b\u524d\u603b\u7ed3\u7684\uff0c\u5206\u4eab\u4e00\u4e0b\u3002<\/p>\n<div class=\"RichText-LinkCardContainer\"><a class=\"LinkCard new css-1wr1m8\" href=\"https:\/\/zhuanlan.zhihu.com\/p\/278028242\" target=\"_blank\" rel=\"noopener\" data-draft-node=\"block\" data-draft-type=\"link-card\" data-text=\"windliang\uff1aWebAssembly\u5165\u95e8\" data-image=\"https:\/\/pic2.zhimg.com\/v2-a2911e992cb675e6c1682cea79ea3401_180x120.jpg\" data-image-width=\"1920\" data-image-height=\"1277\" data-za-detail-view-id=\"172\"><span class=\"LinkCard-contents\"><span class=\"LinkCard-title two-line\">windliang\uff1aWebAssembly\u5165\u95e8<\/span><span class=\"LinkCard-desc\">31 \u8d5e\u540c \u00b7 4 \u8bc4\u8bba<span class=\"LinkCard-tag\">\u6587\u7ae0<\/span><\/span><\/span><span class=\"LinkCard-image\"><img decoding=\"async\" src=\"https:\/\/pic2.zhimg.com\/v2-a2911e992cb675e6c1682cea79ea3401_180x120.jpg\" alt=\"\" \/><\/span><\/a><\/div>\n<h2>\u5f15\u8a00<\/h2>\n<p data-pid=\"GZ1kmkpm\">\u5148\u770b\u4e0b\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/webassembly.org\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u5b98\u7f51<\/a>\u00a0\u7ed9\u7684\u5b9a\u4e49\u3002<\/p>\n<blockquote data-pid=\"DjmRC3uV\"><p>WebAssembly (abbreviated\u00a0<i>Wasm<\/i>) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications.<\/p><\/blockquote>\n<p data-pid=\"uFEl_j7r\"><code>WebAssembly<\/code>\u00a0\u662f\u57fa\u4e8e\u6808\u5f0f\u865a\u62df\u673a\u7684\u4e8c\u8fdb\u5236\u6307\u4ee4\u96c6\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u7f16\u7a0b\u8bed\u8a00\u7684\u7f16\u8bd1\u76ee\u6807\uff0c\u80fd\u591f\u90e8\u7f72\u5728\u00a0<code>web<\/code>\u00a0\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u7684\u5e94\u7528\u4e2d\u3002<\/p>\n<p data-pid=\"cv4EBOti\">\u7b2c\u4e00\u6b21\u770b\u5230\u8fd9\u4e2a\u5b9a\u4e49\u7684\u65f6\u5019\u662f\u4e00\u5934\u96fe\u6c34\uff0c\u7ffb\u4e86\u4e00\u4e9b\u8d44\u6599\u6e10\u6e10\u6709\u4e86\u70b9\u8f6e\u5ed3\uff0c\u4e0b\u8fb9\u5206\u4eab\u4e0b\u6211\u76ee\u524d\u7684\u7406\u89e3\u3002<\/p>\n<p data-pid=\"Bi1_xwzG\">\u9996\u5148\u00a0<code>WebAssembly<\/code>\u00a0\u662f\u7531\u00a0<code>Web<\/code>\u00a0\u548c\u00a0<code>Assembly<\/code>\u00a0\u4e24\u4e2a\u8bcd\u6784\u6210\uff0c\u5176\u4e2d\u00a0<code>Web<\/code>\u00a0\u8868\u660e\u5b83\u4e00\u5b9a\u548c\u524d\u7aef\u6709\u5173\u3002<code>Assembly<\/code>\u00a0\u7684\u610f\u601d\u662f\u6c47\u7f16\uff0c\u6c47\u7f16\u5bf9\u5e94<a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=%E6%9C%BA%E5%99%A8%E7%A0%81&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">\u673a\u5668\u7801<\/a>\uff0c\u800c\u673a\u5668\u7801\u548c\u00a0<code>CPU<\/code>\u00a0\u7684\u6307\u4ee4\u96c6\u6709\u5173\uff0c\u63a5\u4e0b\u6765\u8865\u4e00\u4e0b\u76f8\u5173\u7684\u77e5\u8bc6\u3002<\/p>\n<h2>\u76f8\u5173\u6982\u5ff5<\/h2>\n<p data-pid=\"71rZG_aZ\">\u5176\u4e2d\u6307\u4ee4\u96c6\u3001\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u7684\u77e5\u8bc6\uff0c\u4e4b\u524d\u603b\u7ed3\u8fc7\u51e0\u7bc7\u6587\u7ae0\uff0c<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/windliang.wang\/2019\/11\/06\/%25E5%2588%25B0%25E5%25BA%2595%25E5%25AD%25A6%25E5%2593%25AA%25E4%25B8%2580%25E9%2597%25A8%25E7%25BC%2596%25E7%25A8%258B%25E8%25AF%25AD%25E8%25A8%2580\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u5230\u5e95\u5b66\u54ea\u4e00\u95e8\u7f16\u7a0b\u8bed\u8a00<\/a>\u3001<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/windliang.wang\/2020\/03\/11\/x86-x64-x86-64-amd64-arm%25E6%258C%2587%25E4%25BB%25A4%25E9%259B%2586%25E6%259E%25B6%25E6%259E%2584%25E4%25B9%258B%25E9%2597%25B4%25E7%259A%2584%25E5%2585%25B3%25E7%25B3%25BB\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">x86,x64,x86-64,amd64,arm\u6307\u4ee4\u96c6\u67b6\u6784\u4e4b\u95f4\u7684\u5173\u7cfb<\/a>\u3001<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/windliang.wang\/2019\/05\/21\/linux%25E5%2592%258CAndroid%25E7%259A%2584%25E5%2585%25B3%25E7%25B3%25BB\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">linux\u548cAndroid\u7684\u5173\u7cfb<\/a>\uff0c\u53ef\u4ee5\u5148\u8fc7\u53bb\u770b\u4e00\u4e0b\uff0c\u8fd9\u91cc\u7684\u8bdd\u62bd\u4e3b\u8981\u7684\u90e8\u5206\u56de\u987e\u4e00\u4e0b\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-953036585bc2a93917804f7391d0ed73_1440w.jpg?source=1940ef5c\" width=\"1230\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1230\" data-rawheight=\"494\" data-original=\"https:\/\/pic1.zhimg.com\/v2-953036585bc2a93917804f7391d0ed73_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic1.zhimg.com\/50\/v2-953036585bc2a93917804f7391d0ed73_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"r9qVvur6\">\u53c2\u8003\u4e0a\u56fe\uff0c\u8ba1\u7b97\u673a\u7684\u4e3b\u8981\u67b6\u6784\u5982\u4e0a\u3002\u6700\u5e95\u5c42\u662f\u00a0<code>CPU<\/code>\u00a0\u7684\u6307\u4ee4\u96c6\uff0c\u4e3b\u8981\u5206\u4e3a\u590d\u6742\u6307\u4ee4\u96c6\u548c\u7b80\u5355\u6307\u4ee4\u96c6\u3002<\/p>\n<p data-pid=\"ySLzkBnU\"><a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=%E5%A4%8D%E6%9D%82%E6%8C%87%E4%BB%A4%E9%9B%86&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">\u590d\u6742\u6307\u4ee4\u96c6<\/a>\u662f\u00a0<code>x86<\/code>\u3001<code>x64(\u4e5f\u53eb x86-64, amd64)<\/code>\u00a0\u4e24\u79cd\u67b6\u6784\uff0c\u4e13\u5229\u5728\u00a0<code>Intel<\/code>\u00a0\u548c\u00a0<code>AMD<\/code>\u00a0\u4e24\u5bb6\u516c\u53f8\u624b\u91cc\uff0c \u8be5\u67b6\u6784\u00a0<code>CPU<\/code>\u00a0\u4e3b\u8981\u662f\u00a0<code>Intel<\/code>\u00a0\u548c\u00a0<code>AMD<\/code>\u00a0\u4e24\u5bb6\u516c\u53f8\uff0c\u8fd9\u79cd\u00a0<code>CPU<\/code>\u00a0\u5e38\u7528\u5728\u00a0<code>PC<\/code>\u00a0\u673a\u4e0a\uff0c\u5305\u62ec\u00a0<code>Windows<\/code>\uff0c<code>macOS<\/code>\u00a0\u548c\u00a0<code>Linux<\/code>\u3002<\/p>\n<p data-pid=\"r3_fGrem\">\u7b80\u5355\u6307\u4ee4\u96c6\u662f\u00a0<code>arm<\/code>\u00a0\u4e00\u79cd\u67b6\u6784\uff0c\u4e13\u5229\u5728\u00a0<code>ARM<\/code>\u00a0\u516c\u53f8\u624b\u91cc\uff0c\u8be5\u67b6\u6784\u00a0<code>CPU<\/code>\u00a0\u4e3b\u8981\u6709\u9ad8\u901a\u3001\u4e09\u661f\u3001\u82f9\u679c\u3001\u534e\u4e3a\u6d77\u601d\u3001<a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=%E8%81%94%E5%8F%91%E7%A7%91&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">\u8054\u53d1\u79d1<\/a>\u7b49\u516c\u53f8\u3002\u8fd9\u79cd\u00a0<code>CPU<\/code>\u00a0\u5e38\u7528\u5728\u624b\u673a\u4e0a\uff0c\u5305\u62ec\u5b89\u5353\u548c\u82f9\u679c\u3002<\/p>\n<p data-pid=\"Nj-lpYQH\">\u6307\u4ee4\u96c6\u662f\u4ec0\u4e48\u5462\uff1f\u76f4\u63a5\u628a<a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=%E9%98%AE%E4%B8%80%E5%B3%B0&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">\u962e\u4e00\u5cf0<\/a>\u7684\u8001\u5e08\u7684\u4e00\u4e2a\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.ruanyifeng.com\/blog\/2018\/01\/assembly-language-primer.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u4f8b\u5b50<\/a>\u00a0\u7c98\u8fc7\u6765\uff0c\u5927\u5bb6\u53ef\u4ee5\u770b\u4e00\u4e0b\u3002<\/p>\n<p data-pid=\"uoXoXyAE\"><code>c<\/code>\u00a0\u8bed\u8a00\u7684\u6e90\u7a0b\u5e8f\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">int add_a_and_b(int a, int b) {\r\n   return a + b;\r\n}\r\n\r\nint main() {\r\n   return add_a_and_b(2, 3);\r\n}<\/code><\/pre>\n<\/div>\n<p data-pid=\"zpNrnty0\">\u6240\u5bf9\u5e94\u7684\u6c47\u7f16\u5c31\u662f\u4e0b\u8fb9\u7684\u6837\u5b50\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">_add_a_and_b:\r\n   push   %ebx\r\n   mov    %eax, [%esp+8] \r\n   mov    %ebx, [%esp+12]\r\n   add    %eax, %ebx \r\n   pop    %ebx \r\n   ret  \r\n\r\n_main:\r\n   push   3\r\n   push   2\r\n   call   _add_a_and_b \r\n   add    %esp, 8\r\n   ret<\/code><\/pre>\n<\/div>\n<p data-pid=\"RJyJhUG3\">\u8fd9\u91cc\u7684\u00a0<code>push<\/code>\u00a0\u3001<code>mov<\/code>\u00a0\u6bcf\u4e00\u6761\u6307\u4ee4\u5c31\u662f\u6307\u4ee4\u96c6\u89c4\u5b9a\u7684\u5185\u5bb9\uff0c\u89c4\u5b9a\u4e86\u64cd\u4f5c\u7801\u3001\u64cd\u4f5c\u6570\u4ee5\u53ca\u5177\u4f53\u7684\u529f\u80fd\u3002\u5f53\u7136\u8fd9\u91cc\u662f\u7528\u6c47\u7f16\u8868\u793a\u7684\uff0c\u4e3b\u8981\u662f\u4e3a\u4e86\u6211\u4eec\u4eba\u7c7b\u6765\u8bfb\u5199\uff0c\u6700\u7ec8\u8fd8\u4f1a\u8f6c\u6210\u00a0<code>0,1<\/code>\u00a0\u5e8f\u5217\u3002\u4e0a\u8fb9\u6bcf\u4e2a\u5355\u8bcd\u90fd\u4f1a\u6709\u4e00\u4e2a\u6570\u5b57\u76f8\u5bf9\u5e94\uff0c\u6bd4\u5982\u00a0<code>add<\/code>\u00a0\u6307\u4ee4\u5bf9\u5e94\u00a0<code>00000011<\/code>\u00a0\u3002<\/p>\n<p data-pid=\"KZErYOCm\">\u901a\u8fc7\u89c4\u5b9a\u7684\u6307\u4ee4\u96c6\uff08\u52a0\u6cd5\u7684\u6307\u4ee4\uff0c\u538b\u6808\u6307\u4ee4\u7b49\uff09\uff0c\u7f16\u5199\u76f8\u5173\u7a0b\u5e8f\uff0c\u7136\u540e\u00a0<code>CPU<\/code>\u00a0\u5c31\u4f1a\u4e00\u6761\u4e00\u6761\u7684\u6267\u884c\uff0c\u6700\u7ec8\u5b9e\u73b0\u76f8\u5e94\u7684\u529f\u80fd\u3002<\/p>\n<p data-pid=\"4h572YTK\">\u800c\u00a0<code>WebAssembly<\/code>\u00a0\u5c31\u89c4\u5b9a\u4e86\u4e00\u5957\u6307\u4ee4\u96c6\uff0c\u66f4\u51c6\u786e\u7684\u6765\u8bf4\u662f\u865a\u62df\u6307\u4ee4\u96c6\uff0c\u56e0\u4e3a\u8fd9\u5957\u6307\u4ee4\u96c6\u662f\u8dd1\u5728\u865a\u62df\u673a\u4e0a\u7684\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u7531\u786c\u4ef6\u8fd0\u884c\u3002<\/p>\n<h2>\u5386\u53f2<\/h2>\n<p data-pid=\"xiTFvf76\">\u4e0a\u8fb9\u6211\u4eec\u77e5\u9053\u4e86\u00a0<code>WebAssembly<\/code>\u00a0\u7684\u00a0<code>Assembly<\/code>\u00a0\uff0c\u5373\u6c47\u7f16\uff0c\u4e5f\u5c31\u662f\u6307\u4ee4\u96c6\u3002\u4e0b\u8fb9\u5728\u56de\u987e\u4e0b\u00a0<code>Web<\/code>\uff0c\u5373\u00a0<code>WebAssembly<\/code>\u8bde\u751f\u7684\u539f\u56e0\u3002<\/p>\n<p data-pid=\"tIiUmzVw\">\u8fd9\u91cc\u5c31\u5f97\u8c08\u5230\u00a0<code>javaScript<\/code>\u00a0\u4e86\uff0c\u4f17\u6240\u5468\u77e5\uff0c\u00a0<code>javaScript<\/code>\u00a0\u662f\u4e00\u95e8\u52a8\u6001\u7c7b\u578b\u7684\u8bed\u8a00\uff0c\u7f16\u5199\u7a0b\u5e8f\u65f6\u65e0\u9700\u8003\u8651\u53d8\u91cf\u7c7b\u578b\uff0c\u800c\u4e14\u8fd8\u53ef\u4ee5\u8fd0\u884c\u65f6\u6539\u53d8\u7c7b\u578b\u3002\u5bf9\u4e8e\u6211\u4eec\u5f00\u53d1\u8005\uff0c\u786e\u5b9e\u5f88\u65b9\u4fbf\uff0c\u4f46\u5bf9\u4e8e\u8fd0\u884c\u5b83\u7684\u5f15\u64ce\u5c31\u5f88\u6709\u95ee\u9898\u4e86\u3002\u53c2\u8003\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/time.geekbang.org\/column\/intro\/100048001%3Fcode%3DIpXg2Hdg-kigonWwbirm%252FZC4p5C39fJxsiLckpyppIk%253D\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u8fd9\u91cc<\/a>\u00a0\u7684\u4e00\u5f20\u56fe\uff0c\u770b\u4e00\u4e0b\u00a0<code>V8<\/code>\u00a0\u5f15\u64ce\u4ece\u00a0<code>js<\/code>\u00a0\u6e90\u7801\u5230\u6267\u884c\u7684\u4e00\u4e2a\u8fc7\u7a0b\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-8a34ae8c1a7a0f87e19b1384a025e354_1440w.jpg?source=1940ef5c\" width=\"1142\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1142\" data-rawheight=\"604\" data-original=\"https:\/\/pic3.zhimg.com\/v2-8a34ae8c1a7a0f87e19b1384a025e354_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic3.zhimg.com\/50\/v2-8a34ae8c1a7a0f87e19b1384a025e354_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"_ioj4rjo\">\u7531\u4e8e\u00a0<code>js<\/code>\u00a0\u7684\u52a8\u6001\u7c7b\u578b\uff0c\u89e3\u91ca\u5668\u5728\u6267\u884c\u4ee3\u7801\u7684\u65f6\u5019\u4f1a\u5728\u7c7b\u578b\u5224\u65ad\u4e0a\u5e26\u6765\u4e00\u5b9a\u7684\u6027\u80fd\u6d88\u8017\uff0c\u964d\u4f4e\u6267\u884c\u901f\u5ea6\u3002\u6240\u4ee5\u00a0<code>V8<\/code>\u00a0\u5f15\u64ce\u91c7\u7528\u4e86\u00a0<code>JIT<\/code>\uff08\u5373\u65f6\u7f16\u8bd1\u6280\u672f\uff09 \u6280\u672f\uff0c\u76d1\u63a7\u4e00\u4e9b\u7ecf\u5e38\u6267\u884c\u7684\u4ee3\u7801\uff0c\u5c06\u5176\u7f16\u8bd1\u6210\u00a0<code>CPU<\/code>\u00a0\u76f4\u63a5\u6267\u884c\u7684\u673a\u5668\u7801\uff0c\u63d0\u9ad8\u6267\u884c\u901f\u5ea6\u3002\u4f46\u7531\u4e8e\u00a0<code>js<\/code>\u00a0\u52a8\u6001\u7c7b\u578b\uff0c\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u8fd8\u5f97\u53cd\u4f18\u5316\uff0c\u56de\u5230\u5b57\u8282\u7801\u8fdb\u884c\u6267\u884c\u3002<\/p>\n<p data-pid=\"vxdTvJtt\">\u968f\u7740\u524d\u7aef\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u9879\u76ee\u7684\u5927\u5c0f\u548c\u590d\u6742\u5ea6\u4e0d\u65ad\u589e\u5927\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u573a\u666f\uff0c\u6027\u80fd\u4e0a\u53ef\u80fd\u5df2\u7ecf\u65e0\u6cd5\u6ee1\u8db3\uff0c\u6d4f\u89c8\u5668\u5382\u5546\u4eec\u4e5f\u4e00\u76f4\u5728\u63a2\u7d22\u6027\u80fd\u4f18\u5316\u7684\u65b9\u6cd5\u3002<\/p>\n<h2>NaCl\/PNaCl<\/h2>\n<p data-pid=\"TO4EKhV8\"><code>2011<\/code>\u00a0\u5e74\u00a0<code>Google<\/code>\u00a0\u5728\u00a0<code>Chrome<\/code>\u00a0\u4e2d\u4f7f\u7528\u4e86\u00a0<code>NaCl<\/code>\u00a0\u6280\u672f\uff0c\u53ef\u4ee5\u4f7f\u5f97\u00a0<code>C<\/code>\u00a0\u8bed\u8a00\u7f16\u5199\u7684\u7a0b\u5e8f\u8fd0\u884c\u5230\u6d4f\u89c8\u5668\u4e2d\uff0c\u4e0b\u8fb9\u662f<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/Native_Client\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u7ef4\u57fa\u767e\u79d1<\/a>\u00a0\u7684\u5b9a\u4e49\u3002<\/p>\n<blockquote data-pid=\"QRdol3_7\"><p><b>Google Native Client<\/b>\uff08\u7f29\u5199\u4e3a<b>NaCl<\/b>\uff09\uff0c\u662f\u4e00\u4e2a\u7531<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/%25E8%25B0%25B7%25E6%25AD%258C\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u8c37\u6b4c<\/a>\u6240\u53d1\u8d77\u7684<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/%25E9%2596%258B%25E6%2594%25BE%25E5%258E%259F%25E5%25A7%258B%25E7%25A2%25BC\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u5f00\u653e\u6e90\u4ee3\u7801<\/a>\u8ba1\u5212\uff0c\u91c7\u7528<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/BSD%25E8%25AE%25B8%25E5%258F%25AF%25E8%25AF%2581\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">BSD\u8bb8\u53ef\u8bc1<\/a>\u3002\u5b83\u91c7\u7528<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/%25E6%25B2%2599%25E7%259B%2592_%28%25E8%25A8%2588%25E7%25AE%2597%25E6%25A9%259F%25E5%25AE%2589%25E5%2585%25A8%29\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u6c99\u76d2<\/a>\u6280\u672f\uff0c\u8ba9<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/Intel_x86\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">Intel x86<\/a>\u3001<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/ARM\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">ARM<\/a>\u6216<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/MIPS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">MIPS<\/a>\u5b50\u96c6\u7684<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/%25E6%25A9%259F%25E5%2599%25A8%25E7%25A2%25BC\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u673a\u5668\u4ee3\u7801<\/a>\u76f4\u63a5\u5728\u6c99\u76d2\u4e0a\u8fd0\u884c\u3002\u5b83\u80fd\u591f\u4ece<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/%25E7%2580%258F%25E8%25A6%25BD%25E5%2599%25A8\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u6d4f\u89c8\u5668<\/a>\u76f4\u63a5\u8fd0\u884c\u7a0b\u5e8f\u673a\u5668\u4ee3\u7801\uff0c\u72ec\u7acb\u4e8e\u7528\u6237\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u5916\uff0c\u4f7f<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/Web%25E5%25BA%2594%25E7%2594%25A8%25E7%25A8%258B%25E5%25BA%258F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">Web\u5e94\u7528\u7a0b\u5e8f<\/a>\u53ef\u4ee5\u7528\u63a5\u8fd1\u4e8e\u673a\u5668\u4ee3\u7801\u8fd0\u4f5c\u7684\u901f\u5ea6\u6765\u8fd0\u884c\uff0c\u540c\u65f6\u517c\u987e\u5b89\u5168\u6027\u3002\u5176\u529f\u80fd\u7c7b\u4f3c\u4e8e<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/%25E5%25BE%25AE%25E8%25BB%259F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u5fae\u8f6f<\/a>\u7684\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/ActiveX\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">ActiveX<\/a>\uff0c\u4f46\u662fActiveX\u53ea\u652f\u6301\u89c6\u7a97\u7cfb\u7edf\u3002<\/p><\/blockquote>\n<p data-pid=\"lOJ5cITf\">\u4f46\u4e00\u4e2a\u5b8c\u6574\u7684\u00a0<code>NaCl<\/code>\u00a0\u5e94\u7528\uff0c\u5728\u5206\u53d1\u65f6\u9700\u8981\u63d0\u4f9b\u652f\u6301\u591a\u4e2a\u67b6\u6784\u5e73\u53f0\uff08X86 \/ X64 \/ ARM \u7b49\uff09\u7684\u6a21\u5757\u6587\u4ef6\uff0c\u540e\u6765\u8c37\u6b4c\u53c8\u63a8\u51fa\u4e86\u4e0e\u5e95\u5c42\u67b6\u6784\u65e0\u5173\u7684\u00a0<code>PNaCl<\/code>\u00a0\u6280\u672f\u3002\u4f46\u7531\u4e8e\u5176\u5f00\u53d1\u96be\u5ea6\u3001\u517c\u5bb9\u6027\u7b49\u95ee\u9898\u6700\u7ec8\u6ca1\u6709\u666e\u53ca\u5f00\u6765\u3002\u5728\u00a0<code>2017<\/code>\u00a0\u5e74\u00a0<code>Google<\/code>\u00a0\u5ba3\u5e03\u653e\u5f03\u00a0<code>PNaCl<\/code>\u00a0\u8f6c\u5411\u00a0<code>WebAssembly<\/code>\u3002<\/p>\n<h2>ASM.js<\/h2>\n<p data-pid=\"wk3-wCN3\"><code>ASM.js<\/code>\u00a0\u662f\u00a0<code>Mozilla<\/code>\u00a0\u5728\u00a0<code>2013<\/code>\u00a0\u5e74\u63a8\u51fa\u7684\uff0c\u662f\u00a0<code>javaScript<\/code>\u00a0\u7684\u4e00\u4e2a\u4e25\u683c\u5b50\u96c6\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u00a0<code>C\/C++<\/code>\u00a0\u7f16\u8bd1\u7684\u76ee\u6807\u8bed\u8a00\uff0c\u4ece\u800c\u4f7f\u5f97\u00a0<code>js<\/code>\u00a0\u5f15\u64ce\u53ef\u4ee5\u91c7\u7528\u00a0<code>AOT(Ahead Of Time)<\/code>\u00a0\u7684\u7f16\u8bd1\u7b56\u7565\uff0c\u4e5f\u5c31\u662f\u5728\u8fd0\u884c\u524d\u76f4\u63a5\u7f16\u8bd1\u6210\u673a\u5668\u7801\uff0c\u56e0\u6b64\u8fd0\u884c\u901f\u5ea6\u4f1a\u6709\u4e00\u5b9a\u7684\u63d0\u5347\u3002<\/p>\n<p data-pid=\"UYezOD8b\"><code>ASM.js<\/code>\u00a0\u901a\u5e38\u4e0d\u76f4\u63a5\u7f16\u5199\uff0c\u800c\u662f\u4f5c\u4e3a\u4e00\u79cd\u901a\u8fc7\u7f16\u8bd1\u5668\u751f\u6210\u7684\u4e2d\u95f4\u8bed\u8a00\uff0c\u8be5\u7f16\u8bd1\u5668\u83b7\u53d6\u00a0<code>C++<\/code>\u00a0\u6216\u5176\u4ed6\u8bed\u8a00\u7684\u6e90\u4ee3\u7801\uff0c\u7136\u540e\u8f93\u51fa\u00a0<code>ASM.js<\/code>\u3002<\/p>\n<p data-pid=\"KjlKuV0f\">\u4f8b\u5982\u4e0b\u8fb9\u7684\u00a0<code>C<\/code>\u00a0\u8bed\u8a00\u4ee3\u7801\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">int f(int i) {\r\n  return i + 1;\r\n}<\/code><\/pre>\n<\/div>\n<p data-pid=\"QgXLLcWz\">\u7ecf\u8fc7\u7f16\u8bd1\u5668\u7f16\u8bd1\u4f1a\u751f\u6210\u4e0b\u8fb9\u7684\u00a0<code>js<\/code>\u00a0\u4ee3\u7801\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">function f(i) {\r\n  i = i|0;\r\n  return (i + 1)|0;\r\n}<\/code><\/pre>\n<\/div>\n<p data-pid=\"gcr6Oy1q\">\u6ce8\u610f\u8fd9\u91cc\u7684<code>|0<\/code>\u00a0\u5728\u00a0<code>js<\/code>\u00a0\u4e2d\u76f8\u5f53\u4e8e\u548c\u00a0<code>0<\/code>\u00a0\u8fdb\u884c\u4e86\u6216\u64cd\u4f5c\uff0c\u6240\u4ee5\u4e0d\u5f71\u54cd\u539f\u672c\u7684\u903b\u8f91\u3002\u5728\u00a0<code>asm.js<\/code>\u00a0\u4e2d\u8d77\u5230\u4e86\u7c7b\u578b\u6807\u8bb0\u7684\u4f5c\u7528\uff0c\u8fd9\u6837\u00a0<code>js<\/code>\u00a0\u5f15\u64ce\u6267\u884c\u7684\u65f6\u5019\u5c31\u77e5\u9053\u00a0<code>i<\/code>\u00a0\u662f\u4e00\u4e2a\u6574\u578b\uff0c\u8fd4\u56de\u503c\u662f\u4e00\u4e2a\u6574\u578b\u3002\u9664\u4e86\u6216\u64cd\u4f5c\u8fd9\u79cd\uff0c<code>ASM.js<\/code>\u00a0\u6807\u51c6\u4e2d\u8fd8\u89c4\u5b9a\u4e86\u5f88\u591a\u7c7b\u4f3c\u7684\u6807\u8bb0\u89c4\u5219\uff0c\u7528\u4e8e\u544a\u8bc9\u00a0<code>js<\/code>\u00a0\u5f15\u64ce\u53d8\u91cf\u7684\u7c7b\u578b\uff0c\u4fbf\u4e8e\u8fdb\u884c\u00a0<code>AOT<\/code>\u00a0\u4f18\u5316\u3002<\/p>\n<p data-pid=\"lOIhasq4\">\u8fd9\u770b\u8d77\u6765\u548c\u00a0<code>TypeScript<\/code>\u00a0\u5f88\u50cf\uff0c\u4f46\u5176\u5b9e\u4e0d\u662f\u4e00\u79cd\u4e1c\u897f\u3002<code>TypeScript<\/code>\u00a0\u662f\u00a0<code>js<\/code>\u00a0\u7684\u4e00\u4e2a\u8d85\u96c6\uff0c\u6d4f\u89c8\u5668\u5e76\u4e0d\u80fd\u76f4\u63a5\u6267\u884c\u00a0<code>ts<\/code>\uff0c\u8fd8\u9700\u8981\u8f6c\u6362\u4e3a\u00a0<code>js<\/code>\u00a0\u53bb\u6267\u884c\u3002<code>ts<\/code>\u00a0\u4e3b\u8981\u662f\u5e2e\u52a9\u6211\u4eec\u5f00\u53d1\u4eba\u5458\u53bb\u770b\u7684\uff0c\u589e\u52a0\u4e86\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\uff0c\u4e5f\u53ef\u4ee5\u8ba9\u7f16\u8f91\u5668\u63d0\u524d\u53d1\u73b0\u4e00\u4e9b\u9519\u8bef\u3002\u800c\u00a0<code>asm.js<\/code>\u00a0\u662f\u7528\u4e8e\u5f15\u64ce\u7684\u7f16\u8bd1\u4f18\u5316\u3002<\/p>\n<h2>WebAssembly<\/h2>\n<p data-pid=\"I6imLWqx\">\u63a5\u4e0b\u6765\u770b\u4e00\u4e0b\u00a0<code>WebAssembly<\/code>\u00a0\u7684\u5386\u53f2\u3002<\/p>\n<blockquote data-pid=\"tNnjkcM4\"><p>2015 \u5e74 4 \u6708\uff0cWebAssembly Community Group \u6210\u7acb\uff1b<br \/>\n2015 \u5e74 6 \u6708\uff0cWebAssembly \u7b2c\u4e00\u6b21\u4ee5 WCG \u7684\u5b98\u65b9\u540d\u4e49\u5411\u5916\u754c\u516c\u5e03\uff1b<br \/>\n2016 \u5e74 8 \u6708\uff0cWebAssembly \u5f00\u59cb\u8fdb\u5165\u4e86\u6f2b\u957f\u7684 \u201cBrowser Preview\u201d \u9636\u6bb5\uff1b<br \/>\n2017 \u5e74 2 \u6708\uff0cWebAssembly \u5b98\u65b9 LOGO \u5728 Github \u4e0a\u7684\u4f17\u591a\u8ba8\u8bba\u4e2d\u88ab\u6700\u7ec8\u786e\u5b9a\uff1b\u540c\u5e74\u540c\u6708\uff0c\u4e00\u4e2a\u5386\u53f2\u6027\u7684\u9636\u6bb5\uff0c\u56db\u5927\u6d4f\u89c8\u5668\uff08FireFox\u3001Chrome\u3001Edge\u3001WebKit\uff09\u5728 WebAssembly \u7684 MVP\uff08\u6700\u5c0f\u53ef\u7528\u7248\u672c\uff09\u6807\u51c6\u5b9e\u73b0\u4e0a\u8fbe\u6210\u5171\u8bc6\uff0c\u8fd9\u610f\u5473\u7740 WebAssembly \u5728\u5176 MVP \u6807\u51c6\u4e0a\u7684 \u201cBrower Preview\u201d \u9636\u6bb5\u5df2\u7ecf\u7ed3\u675f\uff1b<br \/>\n2017 \u5e74 8 \u6708\uff0cW3C WebAssembly Working Group \u6210\u7acb\uff0c\u610f\u5473\u7740 WebAssembly \u6b63\u5f0f\u6210\u4e3a W3C \u4f17\u591a\u6280\u672f\u6807\u51c6\u4e2d\u7684\u4e00\u5458\u3002<\/p><\/blockquote>\n<p data-pid=\"V9BlJ98M\"><code>WebAssembly<\/code>\u00a0\u4e8e\u00a0<code>2019<\/code>\u00a0\u5e74\u00a0<code>12<\/code>\u00a0\u6708\u00a0<code>5<\/code>\u00a0\u65e5\u6210\u4e3a\u4e07\u7ef4\u7f51\u8054\u76df\uff08<code>W3C<\/code>\uff09\u7684\u63a8\u8350\u6807\u51c6\uff0c\u4e0e\u00a0<code>HTML<\/code>\uff0c<code>CSS<\/code>\u00a0\u548c\u00a0<code>JavaScript<\/code>\u00a0\u4e00\u8d77\u6210\u4e3a\u00a0<code>Web<\/code>\u00a0\u7684\u7b2c\u56db\u79cd\u8bed\u8a00\u3002<\/p>\n<p data-pid=\"_C4h-Fry\">\u53ef\u4ee5\u770b\u4e00\u4e0b\u76ee\u524d\u6d4f\u89c8\u5668\u7684\u652f\u6301\u7a0b\u5ea6\uff0c\u5df2\u7ecf\u7b97\u6bd4\u8f83\u9ad8\u4e86\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pica.zhimg.com\/80\/v2-62c512d5a8cb3b63c585721c223afeb5_1440w.jpg?source=1940ef5c\" width=\"2726\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"2726\" data-rawheight=\"912\" data-original=\"https:\/\/pic2.zhimg.com\/v2-62c512d5a8cb3b63c585721c223afeb5_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pica.zhimg.com\/50\/v2-62c512d5a8cb3b63c585721c223afeb5_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<h2>\u521d\u4f53\u9a8c<\/h2>\n<h2>\u5185\u90e8\u7ed3\u6784<\/h2>\n<p data-pid=\"gK363Ohz\">\u76ee\u524d\u5df2\u7ecf\u6709\u4e86\u5c06\u00a0<code>C\/C++<\/code>\u00a0\u3001<code>Rust<\/code>\u3001<code>ts<\/code>\u3001<code>C#<\/code>\u3001<code>Go<\/code>\u3001<code>Kotlin<\/code>\u3001<code>Swift<\/code>\u00a0\u7b49\u8bed\u8a00\u8f6c\u6362\u4e3a\u00a0<code>WebAssembly(wasm)<\/code>\u00a0\u7684\u5de5\u5177\uff0c\u4e0b\u8fb9\u6211\u4eec\u4f53\u9a8c\u4e00\u4e0b\u00a0<code>C++<\/code>\u00a0\u8f6c\u6362\u7684\u8fc7\u7a0b\u3002<\/p>\n<p data-pid=\"OunBxXZ_\">\u9996\u5148\u7f16\u5199\u4e00\u4e2a\u00a0<code>C++<\/code>\u00a0\u7a0b\u5e8f\u00a0<code>fibonacci.cc<\/code>\uff0c<a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=%E6%96%90%E6%B3%A2%E7%BA%B3%E5%A5%91%E6%95%B0%E5%AD%97&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">\u6590\u6ce2\u7eb3\u5951\u6570\u5b57<\/a>\u7684\u9012\u5f52\u5199\u6cd5\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">#include &lt;emscripten.h&gt;\r\nextern \"C\" {\r\n  EMSCRIPTEN_KEEPALIVE \r\n  int fibonacci(int n) {\r\n    if(n &lt; 2) {\r\n      return 1;\r\n    }\r\n    return fibonacci(n - 1) + fibonacci(n - 2);\r\n  }\r\n}<\/code><\/pre>\n<\/div>\n<p data-pid=\"Cwqzv9Tk\">\u51fd\u6570\u7684\u5b9a\u4e49\u7f6e\u5728\u00a0<code>extern \u201cC\u201d {}<\/code>\u00a0\u7ed3\u6784\u4e2d\uff0c\u662f\u4e3a\u4e86\u9632\u6b62\u51fd\u6570\u540d\u7f16\u8bd1\u540e\u88ab\u6539\u53d8\u3002<code>EMSCRIPTEN_KEEPALIVE<\/code>\u00a0\u662f\u4e3a\u4e86\u786e\u4fdd\u51fd\u6570\u4e0d\u4f1a\u5728\u7f16\u8bd1\u5668\u7684\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u88ab\u00a0<code>DCE\uff08Dead Code \u300dlimination\uff09<\/code>\u8fc7\u7a0b\u5904\u7406\u6389\u3002<\/p>\n<p data-pid=\"Ivd0Fh2H\">\u7136\u540e\u9700\u8981\u5b89\u88c5\u00a0<code>Emscripten<\/code>\u00a0\u7528\u6765\u5c06\u00a0<code>C++<\/code>\u00a0\u7a0b\u5e8f\u7f16\u8bd1\u4e3a\u00a0<code>WebAssembly(wasm)<\/code>\u00a0\u7684\u7a0b\u5e8f\uff0c\u5b89\u88c5\u540e\u6267\u884c\u4e0b\u8fb9\u7684\u547d\u4ee4\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">emcc fibonacci.cc -s WASM=1 -O3 --no-entry -o fibonacci.wasm<\/code><\/pre>\n<\/div>\n<p data-pid=\"UEaBPzAX\"><code>-s WASM=1<\/code>\u00a0\u8868\u660e\u7f16\u8bd1\u6210\u00a0<code>Webassembly<\/code>\u00a0\u7684\u7a0b\u5e8f\uff0c<code>-O3<\/code>\u00a0\u8868\u660e\u7f16\u8bd1\u7684\u4f18\u5316\u7a0b\u5ea6\uff0c<code>\u2013no-entry<\/code>\u00a0\u53c2\u6570\u544a\u8bc9\u7f16\u8bd1\u5668\u6ca1\u6709\u58f0\u660e\u00a0<code>main<\/code>\u00a0\u51fd\u6570\uff0c<code>-o<\/code>\u00a0\u6307\u5b9a\u751f\u6210\u7684\u6587\u4ef6\u540d\u3002<\/p>\n<p data-pid=\"M1fmT2R_\">\u8ba9\u6211\u4eec\u770b\u4e00\u4e0b\u751f\u6210\u7684\u5b57\u8282\u7801\u6587\u4ef6\u00a0<code><\/code><a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=fibonacci.wasm&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">fibonacci.wasm<\/a>\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">Offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F   \r\n00000000: 00 61 73 6D 01 00 00 00 01 11 04 60 00 01 7F 60    .asm.......`...`\r\n00000010: 01 7F 01 7F 60 00 00 60 01 7F 00 03 07 06 02 01    ....`..`........\r\n00000020: 00 03 01 00 04 05 01 70 01 02 02 05 06 01 01 80    .......p........\r\n00000030: 02 80 02 06 0F 02 7F 01 41 90 88 C0 02 0B 7F 00    ........A..@....\r\n00000040: 41 84 08 0B 07 88 01 09 06 6D 65 6D 6F 72 79 02    A........memory.\r\n00000050: 00 19 5F 5F 69 6E 64 69 72 65 63 74 5F 66 75 6E    ..__indirect_fun\r\n00000060: 63 74 69 6F 6E 5F 74 61 62 6C 65 01 00 09 66 69    ction_table...fi\r\n00000070: 62 6F 6E 61 63 63 69 00 01 0B 5F 69 6E 69 74 69    bonacci..._initi\r\n00000080: 61 6C 69 7A 65 00 00 10 5F 5F 65 72 72 6E 6F 5F    alize...__errno_\r\n00000090: 6C 6F 63 61 74 69 6F 6E 00 05 09 73 74 61 63 6B    location...stack\r\n000000a0: 53 61 76 65 00 02 0C 73 74 61 63 6B 52 65 73 74    Save...stackRest\r\n000000b0: 6F 72 65 00 03 0A 73 74 61 63 6B 41 6C 6C 6F 63    ore...stackAlloc\r\n000000c0: 00 04 0A 5F 5F 64 61 74 61 5F 65 6E 64 03 01 09    ...__data_end...\r\n000000d0: 07 01 00 41 01 0B 01 00 0A 66 06 03 00 01 0B 3D    ...A.....f.....=\r\n000000e0: 01 02 7F 41 01 21 01 20 00 41 02 4E 04 7F 41 00    ...A.!...A.N..A.\r\n000000f0: 21 01 03 40 20 00 41 7F 6A 10 01 20 01 6A 21 01    !..@..A.j....j!.\r\n00000100: 20 00 41 03 4A 21 02 20 00 41 7E 6A 21 00 20 02    ..A.J!...A~j!...\r\n00000110: 0D 00 0B 20 01 41 01 6A 05 41 01 0B 0B 04 00 23    .....A.j.A.....#\r\n00000120: 00 0B 06 00 20 00 24 00 0B 10 00 23 00 20 00 6B    ......$....#...k\r\n00000130: 41 70 71 22 00 24 00 20 00 0B 05 00 41 80 08 0B    Apq\".$......A...<\/code><\/pre>\n<\/div>\n<p data-pid=\"RHc5bTKb\">\u8ba9\u6211\u4eec\u6765\u89e3\u8bfb\u4e0b\uff0c\u6700\u5f00\u59cb\u7684\u524d\u516b\u4e2a\u5b57\u8282\u00a0<code>0x0 0x61 0x73 0x6d 0x1 0x0 0x0 0x0<\/code>\u00a0\u8868\u660e\u5f53\u524d\u662f\u4e00\u4e2a\u00a0<code>wasm<\/code>\u00a0\u7684\u6a21\u5757\u3002\u7136\u540e\u4f1a\u5206\u5f88\u591a\u00a0<code>Section<\/code>\u00a0\uff0c<code>Function Section<\/code>\uff0c\u00a0<code>Code Section<\/code>\u00a0\u7b49\u7b49\uff0c\u90fd\u6709\u7279\u5b9a\u7684\u6570\u5b57\u5bf9\u5e94\uff0c\u8fd8\u6709\u5c31\u662f\u6587\u7ae0\u5f00\u5934\u8bb2\u7684\u6307\u4ee4\u64cd\u4f5c\u7b26\u6240\u5bf9\u5e94\u7684\u4e00\u4e9b\u6570\u5b57\u3002<\/p>\n<p data-pid=\"fwXDntaR\">\u770b\u7740\u4e0a\u8fb9\u7684\u5b57\u8282\u7801\u4eff\u4f5b\u56de\u5230\u4e86\u4e0a\u53e4\u65f6\u671f\u76f4\u63a5\u7528\u673a\u5668\u7801\u7f16\u7a0b\u7684\u65f6\u4ee3\uff0c\u5f53\u5e74\u51fa\u73b0\u4e86\u6c47\u7f16\u8bed\u8a00\u3002\u8fd9\u91cc\u4e5f\u4f1a\u6709\u7c7b\u4f3c\u6c47\u7f16\u7684\u4e1c\u897f\uff0c\u90a3\u5c31\u662f\u00a0<code>WAT\uff08WebAssembly Text Format)<\/code>\u00a0\u3002<\/p>\n<p data-pid=\"IxKKRuLM\">\u9700\u8981\u5b89\u88c5\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/github.com\/WebAssembly\/wabt%23building-using-cmake-directly-linux-and-macos\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">WABT<\/a>\u00a0, \u7136\u540e\u6267\u884c\u00a0<code>wasm2wat<\/code>\u00a0\u547d\u4ee4\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">..\/wabt\/bin\/wasm2wat fibonacci.wasm -o fibonacci.wat<\/code><\/pre>\n<\/div>\n<p data-pid=\"kjeeo3sY\">\u7136\u540e\u5c31\u751f\u6210\u4e86\u00a0<code>fibonacci.wat<\/code>\u00a0\u6587\u4ef6\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">(module\r\n  (type (;0;) (func (result i32)))\r\n  (type (;1;) (func (param i32) (result i32)))\r\n  (type (;2;) (func))\r\n  (type (;3;) (func (param i32)))\r\n  (func (;0;) (type 2)\r\n    nop)\r\n  (func (;1;) (type 1) (param i32) (result i32)\r\n    (local i32 i32)\r\n    i32.const 1\r\n    local.set 1\r\n    local.get 0\r\n    i32.const 2\r\n    i32.ge_s\r\n    if (result i32)  ;; label = @1\r\n      i32.const 0\r\n      local.set 1\r\n      loop  ;; label = @2\r\n        local.get 0\r\n        i32.const -1\r\n        i32.add\r\n        call 1\r\n        local.get 1\r\n        i32.add\r\n        local.set 1\r\n        local.get 0\r\n        i32.const 3\r\n        i32.gt_s\r\n        local.set 2\r\n        local.get 0\r\n        i32.const -2\r\n        i32.add\r\n        local.set 0\r\n        local.get 2\r\n        br_if 0 (;@2;)\r\n      end\r\n      local.get 1\r\n      i32.const 1\r\n      i32.add\r\n    else\r\n      i32.const 1\r\n    end)\r\n  (func (;2;) (type 0) (result i32)\r\n    global.get 0)\r\n  (func (;3;) (type 3) (param i32)\r\n    local.get 0\r\n    global.set 0)\r\n  (func (;4;) (type 1) (param i32) (result i32)\r\n    global.get 0\r\n    local.get 0\r\n    i32.sub\r\n    i32.const -16\r\n    i32.and\r\n    local.tee 0\r\n    global.set 0\r\n    local.get 0)\r\n  (func (;5;) (type 0) (result i32)\r\n    i32.const 1024)\r\n  (table (;0;) 2 2 funcref)\r\n  (memory (;0;) 256 256)\r\n  (global (;0;) (mut i32) (i32.const 5243920))\r\n  (global (;1;) i32 (i32.const 1028))\r\n  (export \"memory\" (memory 0))\r\n  (export \"__indirect_function_table\" (table 0))\r\n  (export \"fibonacci\" (func 1))\r\n  (export \"_initialize\" (func 0))\r\n  (export \"__errno_location\" (func 5))\r\n  (export \"stackSave\" (func 2))\r\n  (export \"stackRestore\" (func 3))\r\n  (export \"stackAlloc\" (func 4))\r\n  (export \"__data_end\" (global 1))\r\n  (elem (;0;) (i32.const 1) func 0))<\/code><\/pre>\n<\/div>\n<p data-pid=\"Xr9qzKYm\">\u4e0a\u8fb9\u7684\u683c\u5f0f\u5c5e\u4e8e \u300cS- \u8868\u8fbe\u5f0f\u300d\uff0c\u00a0<code>Lisp<\/code>\u00a0\u8bed\u8a00\u5c31\u662f\u91c7\u7528\u7684\u8fd9\u79cd\u8868\u8fbe\u5f0f\uff0c\u6bcf\u6761\u8bed\u53e5\u90fd\u662f\u5148\u6267\u884c\u6700\u91cc\u8fb9\u62ec\u53f7\u7684\u8868\u8fbe\u5f0f\u7136\u540e\u4f9d\u6b21\u5c55\u5f00\u3002<\/p>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p data-pid=\"TVTi59CF\">\u4e0a\u8fb9\u4e3b\u8981\u4ecb\u7ecd\u4e86\u00a0<code>.wasm<\/code>\u00a0\u5177\u4f53\u957f\u4ec0\u4e48\u6837\u5b50\uff0c\u4e0b\u8fb9\u770b\u4e00\u4e0b\u600e\u4e48\u7528\u5230\u6d4f\u89c8\u5668\u4e2d\u3002<\/p>\n<p data-pid=\"375i05u0\">\u4ece\u00a0<code>.wasm<\/code>\u00a0\u6e90\u6587\u4ef6\u5230\u5b9e\u4f8b\u5316\u7684\u5bf9\u8c61\u4e3b\u8981\u6709\u4e09\u4e2a\u6b65\u9aa4\uff0c<code>\u52a0\u8f7d -&gt; \u7f16\u8bd1 -&gt; \u5b9e\u4f8b\u5316 -&gt; \u8c03\u7528<\/code>\u3002<\/p>\n<p data-pid=\"PG0uN3kL\">\u52a0\u8f7d\uff1a\u8bfb\u53d6\u00a0<code>.wasm<\/code>\u00a0\u5b57\u8282\u7801\u5230\u672c\u5730\u4e2d\uff0c\u4e00\u822c\u662f\u901a\u8fc7\u00a0<code>fetch<\/code>\u00a0\u4ece\u7f51\u7edc\u4e2d\u53d6\u5f97\u3002<\/p>\n<p data-pid=\"Pnf5SeDl\">\u7f16\u8bd1\uff1a\u5728 Worker \u7ebf\u7a0b\u8fdb\u884c\uff0c\u7f16\u8bd1\u6210\u5e73\u53f0\u76f8\u5173\u7684\u4ee3\u7801\u3002<\/p>\n<p data-pid=\"PkqqmMRu\">\u5b9e\u4f8b\u5316\uff1a\u5c06\u5bbf\u4e3b\u73af\u5883\u7684\u4e00\u4e9b\u5bf9\u8c61\u3001\u65b9\u6cd5\u5bfc\u5165\u5230\u00a0<code>wasm<\/code>\u00a0\u6a21\u5757\u4e2d\uff0c\u6bd4\u5982\u5bfc\u5165\u64cd\u4f5c\u00a0<code>dom<\/code>\u00a0\u7684\u65b9\u6cd5\u3002<\/p>\n<p data-pid=\"4HiCQ3jQ\">\u8c03\u7528\uff1a\u901a\u8fc7\u4e0a\u4e00\u6b65\u5df2\u7ecf\u5b9e\u4f8b\u5316\u7684\u5bf9\u8c61\uff0c\u6765\u8c03\u7528\u00a0<code>wasm<\/code>\u00a0\u6a21\u5757\u4e2d\u7684\u65b9\u6cd5\u3002<\/p>\n<p data-pid=\"cqo8N06U\">\u4e3b\u8981\u6709\u4e24\u79cd\u7c7b\u578b\u7684\u00a0<code>API<\/code>\uff0c\u4e00\u79cd\u662f\u00a0<code>js<\/code>\u00a0\u63d0\u4f9b\u7684\u00a0<code>api<\/code>\u00a0\uff0c\u53e6\u4e00\u79cd\u662f\u00a0<code>Web<\/code>\u00a0\u63d0\u4f9b\u7684\u00a0<code>api<\/code>\u00a0\uff0c<code>Web<\/code>\u00a0\u63d0\u4f9b\u7684\u00a0<code>api<\/code>\u00a0\u652f\u6301\u6d41\u5f0f\u7f16\u8bd1\u5b9e\u4f8b\u5316\u3002<\/p>\n<p data-pid=\"k2Y5RjHD\"><code>js<\/code>\u00a0\u7684\u65b9\u6cd5\uff0c<code>WebAssembly.instantiate(bufferSource, importObject)<\/code>\uff0c\u53ef\u4ee5\u5b8c\u6210\u7f16\u8bd1\u548c\u5b9e\u4f8b\u5316\u3002<\/p>\n<p data-pid=\"jr8ORg3T\"><code>bufferSource<\/code>\u00a0\u662f\u542b\u6709\u6548\u00a0<code>Wasm<\/code>\u00a0\u6a21\u5757\u4e8c\u8fdb\u5236\u5b57\u8282\u7801\u7684\u00a0<code>ArrayBuffer<\/code>\u00a0\u6216\u00a0<code>TypedArray<\/code>\u00a0\u5bf9\u8c61\u3002<\/p>\n<p data-pid=\"tgja8stO\"><code>importObject<\/code>\u00a0\u662f\u8981\u5bfc\u5165\u5230\u00a0<code>Wasm<\/code>\u00a0\u6a21\u5757\u4e2d\u7684\u5bf9\u8c61\u3002<\/p>\n<p data-pid=\"tdQNjEp0\">\u65b9\u6cd5\u5728\u8c03\u7528\u540e\u8fd4\u56de\u4e00\u4e2a<code>Promise<\/code>\u00a0\u5bf9\u8c61\uff0c<code>resolve<\/code>\u00a0\u540e\u8fd4\u56de\u4e00\u4e2a\u5bf9\u8c61\uff0c\u8be5\u5bf9\u8c61\u5305\u542b\u7f16\u8bd1\u597d\u7684\u00a0<code>module<\/code>\u00a0\u548c\u5df2\u7ecf\u5b9e\u4f8b\u5316\u7684\u00a0<code>instance<\/code>\uff0c\u6a21\u5757\u5bfc\u51fa\u7684\u65b9\u6cd5\u53ef\u4ee5\u901a\u8fc7\u00a0<code>instance<\/code>\u00a0\u5bf9\u8c61\u8fdb\u884c\u8c03\u7528\u3002<\/p>\n<p data-pid=\"WOrgbskB\"><code>web<\/code>\u00a0\u7684\u65b9\u6cd5\uff0c<code>WebAssembly.instantiateStreaming(source, importObject)<\/code>\u3002<\/p>\n<p data-pid=\"2TvGLLws\">\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u8fd9\u91cc\u7684\u00a0<code>source<\/code>\u00a0\u6307\u7684\u662f\u5c1a\u672a\u00a0<code>Resolve<\/code>\u00a0\u7684\u00a0<code>Response<\/code>\u00a0\u5bf9\u8c61\uff08<code>window.fetch<\/code>\u00a0\u8c03\u7528\u540e\u4f1a\u8fd4\u56de\u8be5\u5bf9\u8c61\uff09\uff0c\u597d\u5904\u5c31\u662f\u53ef\u4ee5\u8fb9\u8bfb\u53d6\u00a0<code>.wasm<\/code>\u00a0\u5b57\u8282\u6d41\uff0c\u8fb9\u8fdb\u884c\u7f16\u8bd1\u3002<\/p>\n<p data-pid=\"raT-t7Ty\">\u5176\u4ed6\u53c2\u6570\u548c\u8fd4\u56de\u503c\u548c\u00a0<code>js<\/code>\u00a0\u7684\u00a0<code>api<\/code>\u00a0\u5747\u4e00\u81f4\u3002<\/p>\n<h2>js API \u5c1d\u8bd5<\/h2>\n<p data-pid=\"kMFPR4Zc\">\u5148\u7b80\u5355\u7684\u5c1d\u8bd5\u4e00\u4e0b\uff0c\u6211\u4eec\u76f4\u63a5\u6784\u9020\u4e00\u4e2a\u00a0<code>wasm<\/code>\u00a0\u6a21\u5757\u7684\u00a0<code>TypedArray<\/code>\u00a0\u5bf9\u8c61\uff0c\u8be5\u6a21\u5757\u5305\u542b\u4e86\u4e00\u4e2a\u00a0<code>add<\/code>\u00a0\u65b9\u6cd5\uff0c\u7136\u540e\u8c03\u7528\u00a0<code>WebAssembly.instantiate<\/code>\u00a0\u8fdb\u884c\u7f16\u8bd1\u548c\u5b9e\u4f8b\u5316\u3002<\/p>\n<p data-pid=\"HcQSydhp\">\u5bf9\u5e94\u7684\u00a0<code>C++<\/code>\u00a0\u4ee3\u7801\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">#include &lt;emscripten.h&gt;\r\n\r\nextern \"C\" {\r\n  EMSCRIPTEN_KEEPALIVE \r\n  int add(int a, int b) {\r\n    return a + b;\r\n  }\r\n}<\/code><\/pre>\n<\/div>\n<p data-pid=\"NRxB5Kgq\">\u5bf9\u5e94\u7684\u00a0<code>.wasm<\/code>\u00a0\u5b57\u8282\u7801\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">00 61 73 6D 01 00 00 00 01 17 05 60 00 01 7F 60\r\n00 00 60 01 7F 00 60 01 7F 01 7F 60 02 7F 7F 01\r\n7F 03 07 06 01 04 00 02 03 00 04 05 01 70 01 02\r\n02 05 06 01 01 80 02 80 02 06 0F 02 7F 01 41 90\r\n88 C0 02 0B 7F 00 41 84 08 0B 07 82 01 09 06 6D\r\n65 6D 6F 72 79 02 00 19 5F 5F 69 6E 64 69 72 65\r\n63 74 5F 66 75 6E 63 74 69 6F 6E 5F 74 61 62 6C\r\n65 01 00 03 61 64 64 00 01 0B 5F 69 6E 69 74 69\r\n61 6C 69 7A 65 00 00 10 5F 5F 65 72 72 6E 6F 5F\r\n6C 6F 63 61 74 69 6F 6E 00 05 09 73 74 61 63 6B\r\n53 61 76 65 00 02 0C 73 74 61 63 6B 52 65 73 74\r\n6F 72 65 00 03 0A 73 74 61 63 6B 41 6C 6C 6F 63\r\n00 04 0A 5F 5F 64 61 74 61 5F 65 6E 64 03 01 09\r\n07 01 00 41 01 0B 01 00 0A 30 06 03 00 01 0B 07\r\n00 20 00 20 01 6A 0B 04 00 23 00 0B 06 00 20 00\r\n24 00 0B 10 00 23 00 20 00 6B 41 70 71 22 00 24\r\n00 20 00 0B 05 00 41 80 08 0B<\/code><\/pre>\n<\/div>\n<p data-pid=\"w8ffz1ET\">\u7136\u540e\u76f4\u63a5\u5728\u63a7\u5236\u53f0\u8f93\u5165\u4e0b\u8fb9\u7684\u4ee3\u7801\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">WebAssembly.instantiate(new Uint8Array(`\r\n  00 61 73 6D 01 00 00 00 01 17 05 60 00 01 7F 60\r\n00 00 60 01 7F 00 60 01 7F 01 7F 60 02 7F 7F 01\r\n7F 03 07 06 01 04 00 02 03 00 04 05 01 70 01 02\r\n02 05 06 01 01 80 02 80 02 06 0F 02 7F 01 41 90\r\n88 C0 02 0B 7F 00 41 84 08 0B 07 82 01 09 06 6D\r\n65 6D 6F 72 79 02 00 19 5F 5F 69 6E 64 69 72 65\r\n63 74 5F 66 75 6E 63 74 69 6F 6E 5F 74 61 62 6C\r\n65 01 00 03 61 64 64 00 01 0B 5F 69 6E 69 74 69\r\n61 6C 69 7A 65 00 00 10 5F 5F 65 72 72 6E 6F 5F\r\n6C 6F 63 61 74 69 6F 6E 00 05 09 73 74 61 63 6B\r\n53 61 76 65 00 02 0C 73 74 61 63 6B 52 65 73 74\r\n6F 72 65 00 03 0A 73 74 61 63 6B 41 6C 6C 6F 63\r\n00 04 0A 5F 5F 64 61 74 61 5F 65 6E 64 03 01 09\r\n07 01 00 41 01 0B 01 00 0A 30 06 03 00 01 0B 07\r\n00 20 00 20 01 6A 0B 04 00 23 00 0B 06 00 20 00\r\n24 00 0B 10 00 23 00 20 00 6B 41 70 71 22 00 24\r\n00 20 00 0B 05 00 41 80 08 0B`.trim().split(\/[\\s\\r\\n]+\/g).map(str =&gt; parseInt(str, 16))\r\n)).then(({instance}) =&gt; {\r\n  const { add } = instance.exports\r\n  console.log('2 + 4 =', add(2, 4))\r\n})<\/code><\/pre>\n<\/div>\n<p data-pid=\"xTJJ044U\">\u7136\u540e\u5c31\u4f1a\u770b\u5230\u8f93\u51fa\u4e86\u00a0<code>2 + 4 = 6<\/code>\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic2.zhimg.com\/80\/v2-a5dcd7c68723b430d2e6d8a4c41c86ab_1440w.jpg?source=1940ef5c\" width=\"1328\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1328\" data-rawheight=\"816\" data-original=\"https:\/\/pic3.zhimg.com\/v2-a5dcd7c68723b430d2e6d8a4c41c86ab_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic2.zhimg.com\/50\/v2-a5dcd7c68723b430d2e6d8a4c41c86ab_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<h2>Web API \u5c1d\u8bd5<\/h2>\n<p data-pid=\"se7N0jIF\">\u6211\u4eec\u518d\u5c1d\u8bd5\u4e00\u4e0b\u6d41\u5f0f\u7f16\u8bd1\u3002\u76f4\u63a5\u4f7f\u7528\u4e4b\u524d\u7684\u6590\u6ce2\u7eb3\u5951\u6570\u5b57\u7684\u00a0<code>fibonacci.wasm<\/code>\u00a0\u6a21\u5757\u3002<\/p>\n<p data-pid=\"AQ_INsBJ\">\u9996\u5148\u6211\u4eec\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u7684\u00a0<code>HTTP<\/code>\u00a0\u670d\u52a1\uff0c\u7528\u6765\u8fd4\u56de\u00a0<code>.wasm<\/code>\u00a0\u6587\u4ef6\u3002<\/p>\n<p data-pid=\"uX64YWvf\">\u65b0\u5efa\u4e00\u4e2a\u00a0<code><\/code><a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=node.js&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">node.js<\/a>\u00a0\u6587\u4ef6\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">const http = require('http');\r\nconst url = require('url');\r\nconst fs = require('fs');\r\nconst path =require('path');\r\n\r\nconst PORT = 8888;  \/\/ \u670d\u52a1\u5668\u76d1\u542c\u7684\u7aef\u53e3\u53f7\uff1b\r\n\r\nconst mime = {\r\n  \"html\": \"text\/html;charset=UTF-8\",\r\n  \"wasm\": \"application\/wasm\"  \/\/ \u5f53\u9047\u5230\u5bf9 \".wasm\" \u683c\u5f0f\u6587\u4ef6\u7684\u8bf7\u6c42\u65f6\uff0c\u8fd4\u56de\u7279\u5b9a\u7684 MIME \u5934\uff1b\r\n};\r\n\r\nhttp.createServer((req, res) =&gt; {\r\n  let realPath = path.join(__dirname, `.${url.parse(req.url).pathname}`);\r\n  \/\/ \u68c0\u67e5\u6240\u8bbf\u95ee\u6587\u4ef6\u662f\u5426\u5b58\u5728\uff0c\u4e14\u662f\u5426\u53ef\u8bfb\uff1b\r\n  fs.access(realPath, fs.constants.R_OK, err =&gt; {  \r\n    if (err) {\r\n      res.writeHead(404, { 'Content-Type': 'text\/plain' });\r\n      res.end();\r\n    } else {\r\n      fs.readFile(realPath, \"binary\", (err, file) =&gt; {\r\n        if (err) {\r\n          \/\/ \u6587\u4ef6\u8bfb\u53d6\u5931\u8d25\u65f6\u8fd4\u56de 500\uff1b          \r\n          res.writeHead(500, { 'Content-Type': 'text\/plain' });\r\n          <\/code><\/pre>\n<p><a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=res.end&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">res.end<\/a><\/p>\n<pre><code class=\"language-text\">();\r\n        } else {\r\n          \/\/ \u6839\u636e\u8bf7\u6c42\u7684\u6587\u4ef6\u8fd4\u56de\u76f8\u5e94\u7684\u6587\u4ef6\u5185\u5bb9\uff1b\r\n          let ext = path.extname(realPath);\r\n          ext = ext ? ext.slice(1) : 'unknown';\r\n          let contentType = mime[ext] || \"text\/plain\";\r\n          res.writeHead(200, { 'Content-Type': contentType });\r\n          res.write(file, \"binary\");\r\n          res.end();\r\n        }\r\n      });\r\n    }\r\n  });\r\n}).listen(PORT);\r\n<\/code><\/pre>\n<p><a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=console.log&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">console.log<\/a><\/p>\n<pre><code class=\"language-text\">(\"Server is runing at port: \" + PORT + \".\");<\/code><\/pre>\n<\/div>\n<p data-pid=\"9_rMXfIY\">\u7136\u540e\u6765\u7f16\u5199\u6211\u4eec\u7684\u00a0<code>html<\/code>\u00a0\u6587\u4ef6\uff0c\u8bb2\u5230<a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=%E6%96%90%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0%E5%AD%97&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">\u6590\u6ce2\u90a3\u5951\u6570\u5b57<\/a>\uff0c\u6211\u4eec\u987a\u4fbf\u505a\u4e00\u4e2a\u6027\u80fd\u7684\u6d4b\u8bd5\uff0c\u6765\u6bd4\u8f83\u4e00\u4e0b\u4f7f\u7528\u00a0<code>wasm<\/code>\u00a0\u7684\u65b9\u5f0f\u548c\u539f\u751f\u00a0<code>js<\/code>\u00a0\u7684\u6c42\u89e3\u901f\u5ea6\u3002<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=\"UTF-8\" \/&gt;\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/&gt;\r\n    &lt;title&gt;\u6590\u6ce2\u7eb3\u5207\u6570\u5b57&lt;\/title&gt;\r\n  &lt;\/head&gt;\r\n  &lt;script&gt;\r\n    function fibonacciJS(n) {\r\n      if (n &lt; 2) {\r\n        return 1;\r\n      }\r\n      return fibonacciJS(n - 1) + fibonacciJS(n - 2);\r\n    }\r\n    const response = fetch(\"fibonacci.wasm\");\r\n    const num = [5, 15, 25, 35, 45];\r\n    WebAssembly.instantiateStreaming(response).then(\r\n      ({ instance }) =&gt; {\r\n        let { fibonacci } = instance.exports;\r\n        for(let n of num) {\r\n          console.log(`\u6590\u6ce2\u7eb3\u5207\u6570\u5b57: ${n}\uff0c\u8fd0\u884c 10 \u6b21`)\r\n          let cTime = 0;\r\n          let jsTime = 0;\r\n          for(let time = 0; time &lt; 10; time++) {\r\n            let start = performance.now();\r\n            fibonacci(n)\r\n            cTime += (performance.now() - start)\r\n\r\n            start = performance.now();\r\n            fibonacciJS(n)\r\n            jsTime += (performance.now() - start)\r\n          }\r\n          console.log(`wasm \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a${cTime \/ 10}ms`)\r\n          console.log(`js \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a${jsTime \/ 10}ms`)\r\n        }\r\n\r\n      }\r\n    )\r\n  &lt;\/script&gt;\r\n  &lt;body&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<\/div>\n<p data-pid=\"3qyIs4J5\">\u7136\u540e\u6267\u884c\u00a0<code>node node.js<\/code>\u00a0\u5f00\u542f\u00a0<code>http<\/code>\u00a0\u670d\u52a1\uff0c\u63a5\u7740\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u00a0<code>http:\/\/localhost:8888\/index.html<\/code>\uff0c\u63a7\u5236\u53f0\u4e2d\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-text\">\u6590\u6ce2\u7eb3\u5207\u6570\u5b57: 5\uff0c\u8fd0\u884c 10 \u6b21\r\nindex.html:34 wasm \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a0.001499993959441781ms\r\nindex.html:35 js \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a0.005500001134350896ms\r\nindex.html:22 \u6590\u6ce2\u7eb3\u5207\u6570\u5b57: 15\uff0c\u8fd0\u884c 10 \u6b21\r\nindex.html:34 wasm \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a0.005999993300065398ms\r\nindex.html:35 js \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a0.15650001005269587ms\r\nindex.html:22 \u6590\u6ce2\u7eb3\u5207\u6570\u5b57: 25\uff0c\u8fd0\u884c 10 \u6b21\r\nindex.html:34 wasm \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a0.6239999900572002ms\r\nindex.html:35 js \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a1.1620000121183693ms\r\nindex.html:22 \u6590\u6ce2\u7eb3\u5207\u6570\u5b57: 35\uff0c\u8fd0\u884c 10 \u6b21\r\nindex.html:34 wasm \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a70.59700000681914ms\r\nindex.html:35 js \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a126.21099999523722ms\r\nindex.html:22 \u6590\u6ce2\u7eb3\u5207\u6570\u5b57: 45\uff0c\u8fd0\u884c 10 \u6b21\r\nindex.html:34 wasm \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a8129.7520000021905ms\r\nindex.html:35 js \u6a21\u5757\u5e73\u5747\u8c03\u7528\u65f6\u95f4\uff1a16918.658500007587ms<\/code><\/pre>\n<\/div>\n<p data-pid=\"T6YNvFSe\">\u6574\u7406\u6210\u8868\u683c\u770b\u4e00\u4e0b\uff1a<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pica.zhimg.com\/80\/v2-7bdaf707a4d16646c2819f9fc87e045d_1440w.jpg?source=1940ef5c\" width=\"1192\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1192\" data-rawheight=\"172\" data-original=\"https:\/\/pic1.zhimg.com\/v2-7bdaf707a4d16646c2819f9fc87e045d_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pica.zhimg.com\/50\/v2-7bdaf707a4d16646c2819f9fc87e045d_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"l-AZ1Hm1\">\u53ef\u4ee5\u770b\u5230\u00a0<code>wasm<\/code>\u00a0\u5f88\u660e\u663e\u7684\u63d0\u9ad8\u4e86\u8fd0\u884c\u901f\u5ea6\uff0c\u8fd0\u884c\u65f6\u95f4\u7a33\u5b9a\u5728\u00a0<code>js<\/code>\u00a0\u7684\u4e00\u534a\uff0c\u5f53\u89c4\u6a21\u8fbe\u5230\u00a0<code>45<\/code>\u00a0\u7684\u65f6\u5019\uff0c<code>wasm<\/code>\u00a0\u7684\u8fd0\u884c\u65f6\u95f4\u6bd4\u00a0<code>js<\/code>\u00a0\u5c11\u4e86\u6574\u6574\u00a0<code>8<\/code>\u00a0\u79d2\u3002<\/p>\n<p data-pid=\"v0QgTpx2\">\u8fd9\u91cc\u4e5f\u53ef\u4ee5\u770b\u51fa\uff0c\u5982\u679c\u5bf9\u4e8e\u8ba1\u7b97\u5bc6\u96c6\u578b\u7684\u5e94\u7528\uff0c<code>wasm<\/code>\u00a0\u53ef\u4ee5\u5927\u5c55\u8eab\u624b\u4e86\u3002<\/p>\n<h2>\u524d\u7aef\u5e94\u7528<\/h2>\n<p data-pid=\"UM2o9fr-\">\u6765\u770b\u4e00\u4e9b\u76ee\u524d\u5df2\u7ecf\u6210\u529f\u843d\u5730\u7684\u00a0<code>WebAssembly<\/code>\u00a0\u7684\u5e94\u7528\u3002<\/p>\n<ol>\n<li data-pid=\"gjs0sVtU\"><code>eBay<\/code>\u00a0\u7684\u6761\u5f62\u7801\u626b\u63cf<\/li>\n<\/ol>\n<p data-pid=\"Dz-QK80i\"><code>eBay<\/code>\u00a0\u5728\u539f\u751f\u5e94\u7528\u4e2d\u6709\u4e13\u95e8\u7684\u00a0<code>C++<\/code>\u00a0\u5e93\u7528\u4e8e\u6761\u5f62\u7801\u7684\u626b\u63cf\uff0c\u5728\u00a0<code>H5<\/code>\u00a0\u4e2d\u5229\u7528\u5f00\u6e90\u00a0<code>JavaScript<\/code>\u00a0\u5e93\u00a0<code>BarcodeReader<\/code>\u00a0\u505a\u4e86\u4e00\u4e2a\u5e26\u6761\u5f62\u7801\u626b\u63cf\u529f\u80fd\u7684Web\u7248\u672c\u3002 \u95ee\u9898\u662f\u5b83\u53ea\u6709\u5728\u00a0<code>20\uff05<\/code>\u00a0\u7684\u65f6\u95f4\u8868\u73b0\u826f\u597d\u3002 \u5269\u4f59\u7684\u00a0<code>80\uff05<\/code>\u00a0\u7684\u65f6\u95f4\u8fd0\u884c\u975e\u5e38\u7f13\u6162\uff0c\u51c6\u786e\u7387\u4e5f\u4e0d\u9ad8\u3002<\/p>\n<p data-pid=\"_J8gRGxG\">\u6700\u7ec8\u7684\u89e3\u51b3\u65b9\u6848\u662f\u901a\u8fc7\u00a0<code>wasm<\/code>\u00a0\uff0c\u5c06\u539f\u6709\u7684\u00a0<code>c++<\/code>\u00a0\u5e93\u5f15\u5165\uff0c\u4ee5\u53ca\u4e1a\u754c\u5341\u5206\u6709\u540d\u7684\u3001\u57fa\u4e8e\u00a0<code>C<\/code>\u00a0\u8bed\u8a00\u7f16\u5199\u7684\u5f00\u6e90\u6761\u5f62\u7801\u626b\u63cf\u5e93\u00a0<code>ZBar<\/code>\u00a0\u5f15\u5165\uff0c\u518d\u52a0\u4e0a\u539f\u672c\u7684\u00a0<code>js<\/code>\u00a0\u5e93\uff0c\u4e09\u8005\u534f\u52a9\uff0c\u6700\u7ec8\u8bc6\u522b\u7387\u8fbe\u5230\u4e86\u00a0<code>100%<\/code>\u3002<\/p>\n<p data-pid=\"9I8nfllS\">\u4ea7\u54c1\u4e0a\u7ebf\u540e\u7684\u6700\u7ec8\u6548\u679c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-bb5a300749c27008137e8f45c9bdced9_1440w.jpg?source=1940ef5c\" width=\"600\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"600\" data-rawheight=\"302\" data-original=\"https:\/\/pic2.zhimg.com\/v2-bb5a300749c27008137e8f45c9bdced9_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic3.zhimg.com\/50\/v2-bb5a300749c27008137e8f45c9bdced9_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"YDKOks_b\">\u4ea7\u54c1\u5728\u4e0a\u7ebf\u4f7f\u7528\u4e86\u4e00\u6bb5\u65f6\u95f4\u540e\uff0c<code>eBay<\/code>\u00a0\u6280\u672f\u56e2\u961f\u5bf9\u5e94\u7528\u7684\u6761\u5f62\u7801\u626b\u63cf\u60c5\u51b5\u8fdb\u884c\u4e86\u7edf\u8ba1\uff0c\u7ed3\u679c\u53d1\u73b0\u6709\u00a0<code>53%<\/code>\u00a0\u7684\u6210\u529f\u626b\u63cf\u6765\u81ea\u4e8e\u00a0<code>ZBar<\/code>\uff1b<code>34%<\/code>\u00a0\u6765\u81ea\u4e8e\u81ea\u7814\u7684\u00a0<code>C++<\/code>\u00a0\u5e93\u3002\u5269\u4e0b\u7684\u00a0<code>13%<\/code>\u00a0\u5219\u6765\u81ea\u4e8e\u7b2c\u4e09\u65b9\u7684\u00a0<code>JavaScript<\/code>\u00a0\u5e93\u5b9e\u73b0\u3002\u53ef\u89c1\uff0c\u5176\u4e2d\u901a\u8fc7\u00a0<code>Wasm<\/code>\u00a0\u5b9e\u73b0\u5f97\u5230\u7684\u626b\u63cf\u7ed3\u679c\u5360\u636e\u4e86\u603b\u6210\u529f\u6b21\u6570\u7684\u00a0<code>87%<\/code>\u3002<\/p>\n<p data-pid=\"cZSsPTla\">\u66f4\u8be6\u7ec6\u7684\u8fc7\u7a0b\u53ef\u4ee5\u53c2\u8003\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/www.infoq.cn\/article\/vc%2Aq7psQqWMaVU8igJeD\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">WebAssembly\u5728eBay\u7684\u5b9e\u8df5\uff1a\u901f\u5ea6\u63d0\u534750\u500d<\/a>\u3002<\/p>\n<ol>\n<li data-pid=\"g3V51eST\">AutoCAD<\/li>\n<\/ol>\n<p data-pid=\"9XK-kr0U\"><code>AutoCAD<\/code>\u00a0\u662f\u4e00\u6b3e\u7531\u5c06\u8fd1\u00a0<code>40<\/code>\u00a0\u5e74\u5386\u53f2\u7684\u77e5\u540d\u684c\u9762\u7aef\u8bbe\u8ba1\u8f6f\u4ef6\uff0c\u88ab\u5e7f\u6cdb\u5730\u7528\u4e8e\u571f\u6728\u5efa\u7b51\u3001\u88c5\u9970\u88c5\u6f62\u3001\u5de5\u4e1a\u5236\u56fe\u7b49\u591a\u4e2a\u9886\u57df\u4e2d\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-526a41fafae9ffafa80e2c152dd55b4c_1440w.jpg?source=1940ef5c\" width=\"1920\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1920\" data-rawheight=\"1066\" data-original=\"https:\/\/pic1.zhimg.com\/v2-526a41fafae9ffafa80e2c152dd55b4c_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic1.zhimg.com\/50\/v2-526a41fafae9ffafa80e2c152dd55b4c_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"0-hbtrqq\">\u6700\u521d\u57fa\u4e8e<code>C++<\/code>\u00a0\u7f16\u8bd1\u4e3a\u00a0<code>Java<\/code>\u00a0\u4ee3\u7801\u4f9b\u00a0<code>Android<\/code>\u00a0\u8bbe\u5907\u4f7f\u7528\uff0c\u6700\u540e\uff0c\u5728\u00a0<code>Google Web Toolkit<\/code>\uff08\u4e00\u4e2a\u00a0<code>Google<\/code>\u00a0\u5f00\u53d1\u7684\u53ef\u4ee5\u4f7f\u7528\u00a0<code>Java<\/code>\u00a0\u8bed\u8a00\u5f00\u53d1\u00a0<code>Web<\/code>\u00a0\u5e94\u7528\u7684\u5de5\u5177\u96c6\uff09\u7684\u5e2e\u52a9\u4e0b\uff0c\u53c8\u5c06\u8fd9\u4e9b\u00a0<code>Java<\/code>\u00a0\u4ee3\u7801\u8f6c\u8bd1\u4e3a\u4e86\u00a0<code>Web<\/code>\u00a0\u5e73\u53f0\u53ef\u7528\u7684\u00a0<code>JavaScript<\/code>\u00a0\u4ee3\u7801\u3002\u4f46\u6700\u540e\u751f\u6210\u7684\u00a0<code>Web<\/code>\u00a0\u5e94\u7528\u4ee3\u7801\u5e93\u5341\u5206\u5e9e\u5927\uff0c\u4e14\u5728\u6d4f\u89c8\u5668\u4e2d\u7684\u8fd0\u884c\u6027\u80fd\u5e76\u4e0d\u53ef\u89c2\u3002\u8fd9\u4e2a\u300c\u7c97\u7cd9\u7248\u300d\u7684\u00a0<code>Web<\/code>\u00a0\u5e94\u7528\u53d1\u5e03\u4e8e\u00a0<code>2014<\/code>\u00a0\u5e74\u3002<\/p>\n<p data-pid=\"1WQsvlze\"><code>2015<\/code>\u00a0\u5e74\u901a\u8fc7\u00a0<code>Asm.js<\/code>\u00a0\u5c06\u539f\u6709\u7684\u00a0<code>C++<\/code>\u00a0\u4ee3\u7801\u4e2d\u7684\u4e3b\u8981\u529f\u80fd\u76f4\u63a5\u8fdb\u884c\u7f16\u8bd1\u79fb\u690d\u5230\u5230\u00a0<code>Web<\/code>\u00a0\u5e73\u53f0\uff0c\u6027\u80fd\u6709\u4e86\u5f88\u5927\u7684\u63d0\u544a\u3002<code>2018<\/code>\u00a0\u5e74\u00a0<code>3<\/code>\u00a0\u6708\uff0c\u57fa\u4e8e\u00a0<code>Wasm<\/code>\u00a0\u6784\u5efa\u7684\u00a0<code>AutoCAD Web<\/code>\u00a0\u4e5f\u6210\u529f\u8bde\u751f\uff0c<a class=\" external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/web.autocad.com\/login\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\"><span class=\"invisible\">https:\/\/<\/span><span class=\"visible\">web.autocad.com\/login<\/span><\/a>\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pica.zhimg.com\/80\/v2-3e790cd3bb850cd4e36e55d17c7887e9_1440w.jpg?source=1940ef5c\" width=\"1854\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1854\" data-rawheight=\"942\" data-original=\"https:\/\/pic2.zhimg.com\/v2-3e790cd3bb850cd4e36e55d17c7887e9_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pica.zhimg.com\/50\/v2-3e790cd3bb850cd4e36e55d17c7887e9_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<ol>\n<li data-pid=\"So6G0sdD\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/Google%25E5%259C%25B0%25E7%2590%2583\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u8c37\u6b4c\u5730\u7403<\/a><\/li>\n<\/ol>\n<p data-pid=\"7zkxtyHt\"><code>Google<\/code>\u00a0\u5730\u7403\u6700\u521d\u4f7f\u7528\u00a0<code>C++<\/code>\u00a0\u8bed\u8a00\u5728\u00a0<code>Windows<\/code>\u00a0\u5e73\u53f0\u4e0a\u5f00\u53d1\u3002\u540e\u6765\u79fb\u690d\u5230\u4e86\u00a0<code>Android<\/code>\u00a0\u548c\u00a0<code>iOS<\/code>\u00a0\u5e73\u53f0\u4e2d\u3002<code>2017<\/code>\u00a0\u5e74\u00a0<code>4<\/code>\u00a0\u6708\u00a0<code>18<\/code>\u00a0\u65e5\uff0c\u7ecf\u8fc7\u5168\u65b0\u8bbe\u8ba1\u7684\u00a0<code>Google<\/code>\u00a0\u5730\u7403\u00a0<code>9.0<\/code>\u00a0\u53d1\u5e03\u3002\u7531\u4e8e\u91c7\u7528\u4e86\u00a0<a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/zh.wikipedia.org\/wiki\/Native_Client\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">Native Client<\/a>\u00a0\u6280\u672f\uff0c\u521a\u53d1\u5e03\u65f6\u4ec5\u80fd\u5728<code>Chrome<\/code>\u00a0\u4e2d\u8fd0\u884c\u3002<code>2020<\/code>\u00a0\u5e74\u00a0<code>2<\/code>\u00a0\u6708\u00a0<code>27<\/code>\u00a0\u65e5\uff0c<code>Google<\/code>\u00a0\u4f7f\u7528\u00a0<code>C++<\/code>\u00a0\u8bed\u8a00\u901a\u8fc7\u00a0<code>WebAssembly<\/code>\u00a0\u4e0a\u91cd\u5199\u4e86\u00a0<code>Google<\/code>\u00a0\u5730\u7403\uff0c\u4ece\u6b64\u00a0<code>Google<\/code>\u00a0\u5730\u7403\u53ef\u4ee5\u5728\u00a0<code>Firefox<\/code>\u00a0\u548c\u00a0<code>Edge<\/code>\u00a0\u4e0a\u8fd0\u884c\u3002<\/p>\n<ol>\n<li data-pid=\"aQ6clbMd\">bilibili \u4e0a\u4f20\u89c6\u9891\u7684\u5c01\u9762<\/li>\n<\/ol>\n<p data-pid=\"mEk_lSdS\">\u5728\u00a0<a class=\"internal\" href=\"https:\/\/www.zhihu.com\/question\/265700379\/answer\/951118579\" data-za-detail-view-id=\"1043\">\u77e5\u4e4e<\/a>\u00a0\u770b\u5230\u7684\u4e00\u4e2a\u56de\u7b54\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-69d4967947278e4cab3ba299fef523db_1440w.jpg?source=1940ef5c\" width=\"924\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"924\" data-rawheight=\"576\" data-original=\"https:\/\/pic2.zhimg.com\/v2-69d4967947278e4cab3ba299fef523db_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic3.zhimg.com\/50\/v2-69d4967947278e4cab3ba299fef523db_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<blockquote data-pid=\"eXwklaIR\"><p>\u6295\u7a3f\u89c6\u9891\u7684\u65f6\u5019\uff0c\u5f53\u4f60\u7684\u89c6\u9891\u8fd8\u5728\u4e0a\u4f20\u4e2d\uff0c\u5df2\u7ecf\u53ef\u4ee5\u81ea\u7531\u9009\u62e9AI\u63a8\u8350\u7684\u5c01\u9762\u3002\u8fd9\u91cc\u91c7\u7528\u4e86webassembly+AI\u7684\u524d\u7aef\u6574\u5408\u3002<br \/>\nwebassembly \u8d1f\u8d23\u8bfb\u53d6\u672c\u5730\u89c6\u9891\uff0c\u751f\u6210\u56fe\u7247\uff1b<br \/>\n<a class=\"css-pgtd2j\" href=\"https:\/\/www.zhihu.com\/search?q=tensorflow.js&amp;search_source=Entity&amp;hybrid_search_source=Entity&amp;hybrid_search_extra=%7B%22sourceType%22%3A%22answer%22%2C%22sourceId%22%3A1961085507%7D\" target=\"_blank\" rel=\"noopener\" data-za-not-track-link=\"true\">tensorflow.js<\/a>\u00a0\u8d1f\u8d23\u52a0\u8f7dAI\u8bad\u7ec3\u8fc7\u7684 model\uff0c\u8bfb\u53d6\u56fe\u7247\u5e76\u6253\u5206\u3002<br \/>\n\u4ece\u5b8c\u5168\u7684\u670d\u52a1\u7aef\u67b6\u6784 =&gt; \u524d\u7aef\u67b6\u6784 &amp;&amp; \u670d\u52a1\u7aef\u515c\u5e95\u3002<br \/>\nwebassembly\u652f\u6301\u89e3\u679099%\u4ee5\u4e0a\u7684\u89c6\u9891\u7f16\u7801\u683c\u5f0f\uff0c\u901f\u5ea6\u63d0\u5347\u4f53\u9a8c\u60e0\u53ca\u7ea650%\u7684web\u6295\u7a3f\u7528\u6237\u3002<br \/>\n\u4f5c\u8005\uff1aStois Fu \u94fe\u63a5\uff1a<a class=\"internal\" href=\"https:\/\/www.zhihu.com\/question\/265700379\/answer\/951118579\" data-za-detail-view-id=\"1043\"><span class=\"invisible\">https:\/\/www.<\/span><span class=\"visible\">zhihu.com\/question\/2657<\/span><span class=\"invisible\">00379\/answer\/951118579<\/span><\/a>\u00a0\u6765\u6e90\uff1a\u77e5\u4e4e \u8457\u4f5c\u6743\u5f52\u4f5c\u8005\u6240\u6709\u3002\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u8054\u7cfb\u4f5c\u8005\u83b7\u5f97\u6388\u6743\uff0c\u975e\u5546\u4e1a\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u3002<\/p><\/blockquote>\n<p data-pid=\"b8vhNtYJ\">\u7531\u4e8e\u5f53\u524d\u00a0<code>Wasm<\/code>\u00a0\u6807\u51c6\u4e0b\uff0c<code>Wasm<\/code>\u00a0\u6a21\u5757\u4e0d\u80fd\u76f4\u63a5\u64cd\u7eb5\u00a0<code>dom<\/code>\u00a0\u5143\u7d20\uff0c\u6240\u4ee5\u00a0<code>WebAssembly<\/code>\u00a0\u4e3b\u8981\u5e94\u7528\u5728\u4e86\u4e00\u4e9b\u8ba1\u7b97\u5bc6\u96c6\u578b\u7684\u573a\u666f\u4e0b\uff0c\u89c6\u9891\u7684\u89e3\u7801\u7f16\u7801\u3001\u56fe\u50cf\u5904\u7406\u3001\u6d89\u53ca\u5230\u590d\u6742\u8ba1\u7b97\u7684\u7b97\u6cd5\u3001\u52a0\u5bc6\u7b97\u6cd5\u7b49\u7b49\u3002<\/p>\n<h2>\u4e0d\u6b62\u4e8eWeb<\/h2>\n<p data-pid=\"GxLAeV10\"><code>Wasm<\/code>\u00a0\u9664\u4e86\u5e94\u7528\u5728\u6d4f\u89c8\u5668\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u5e94\u7528\u5230\u00a0<code>out-of-web<\/code>\u00a0\u73af\u5883\u4e2d\u3002\u901a\u8fc7\u00a0<code>WASI<\/code>\uff08<code>WebAssembly System Interface<\/code>\uff0c<code>Wasm<\/code>\u00a0\u64cd\u4f5c\u7cfb\u7edf\u63a5\u53e3\uff09\u6807\u51c6\uff0c<code>Wasm<\/code>\u00a0\u53ef\u4ee5\u76f4\u63a5\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u6253\u4ea4\u9053\u3002\u901a\u8fc7\u5df2\u7ecf\u5728\u5404\u79cd\u73af\u5883\u5b9e\u73b0\u4e86\u00a0<code>WASI<\/code>\u00a0\u6807\u51c6\u7684\u865a\u62df\u673a\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5c06\u00a0<code>wasm<\/code>\u00a0\u7528\u5728\u5d4c\u5165\u5f0f\u3001IOT \u7269\u8054\u7f51\u4ee5\u53ca\u751a\u81f3\u4e91\uff0cAI \u548c\u533a\u5757\u94fe\u7b49\u7279\u6b8a\u7684\u9886\u57df\u548c\u573a\u666f\u4e2d\u3002<\/p>\n<p data-pid=\"ZcoLW1v4\">\u6709\u4e86\u00a0<code>WASI<\/code>\u00a0\u6807\u51c6\uff0c\u6587\u7ae0\u6700\u5f00\u59cb\u4ecb\u7ecd\u7684\u5f53\u524d\u5e94\u7528\u7684\u67b6\u6784\u5728\u672a\u6765\u53ef\u80fd\u4f1a\u53d1\u751f\u8d28\u7684\u6539\u53d8\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pica.zhimg.com\/80\/v2-953036585bc2a93917804f7391d0ed73_1440w.jpg?source=1940ef5c\" width=\"1230\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1230\" data-rawheight=\"494\" data-original=\"https:\/\/pic3.zhimg.com\/v2-953036585bc2a93917804f7391d0ed73_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pica.zhimg.com\/50\/v2-953036585bc2a93917804f7391d0ed73_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"4egZCULJ\">\u4e0a\u8fb9\u67b6\u6784\u7684\u6700\u5927\u95ee\u9898\u5c31\u662f\u5404\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u4e0d\u80fd\u517c\u5bb9\uff0c\u540c\u4e00\u4e2a<code>app<\/code>\u00a0\u9700\u8981\u91c7\u7528\u4e0d\u540c\u7684\u8bed\u8a00\u5728\u4e0d\u540c\u5e73\u53f0\u4e0b\u5404\u5b9e\u73b0\u4e00\u6b21\u3002<\/p>\n<p data-pid=\"1Yqoedjv\">\u6bd4\u5982\u4e00\u6b3e\u00a0<code>A<\/code>\u00a0\u5e94\u7528\uff0c\u5982\u679c\u60f3\u5b9e\u73b0\u8de8\u5e73\u53f0\u7684\u8bdd\uff0c\u6211\u4eec\u9700\u8981\u7528\u00a0<code>java<\/code>\u00a0\u5b8c\u6210\u5728\u5b89\u5353\u4e0a\u7684\u5f00\u53d1\uff0c\u7528\u00a0<code>Objective-C<\/code>\u00a0\u5b9e\u73b0\u00a0<code>iOS<\/code>\u00a0\u4e0a\u7684\u5f00\u53d1\uff0c\u7528\u00a0<code>C#<\/code>\u00a0\u5b9e\u73b0\u00a0<code>PC<\/code>\u00a0\u7aef\u7684\u5f00\u53d1&#8230; &#8230;\u4e5f\u5c31\u662f\u4e0b\u8fb9\u7684\u6837\u5b50\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-53bf865350c95d4d68312147959a6064_1440w.jpg?source=1940ef5c\" width=\"1256\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1256\" data-rawheight=\"524\" data-original=\"https:\/\/pica.zhimg.com\/v2-53bf865350c95d4d68312147959a6064_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic1.zhimg.com\/50\/v2-53bf865350c95d4d68312147959a6064_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"t4wgtF6R\">\u4f46\u5982\u679c\u6709\u4e86\u00a0<code>wasm<\/code>\u00a0\uff0c\u6211\u4eec\u53ea\u9700\u8981\u9009\u62e9\u4efb\u610f\u4e00\u95e8\u8bed\u8a00\uff0c\u7136\u540e\u7f16\u8bd1\u6210\u00a0<code>wasm<\/code>\uff0c\u5c31\u53ef\u4ee5\u5206\u53d1\u5230\u5404\u4e2a\u5e73\u53f0\u4e0a\u4e86\u3002<\/p>\n<figure data-size=\"normal\"><img decoding=\"async\" class=\"origin_image zh-lightbox-thumb lazy\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-42272fd4e389da72377afe0a46690720_1440w.jpg?source=1940ef5c\" width=\"1268\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"1268\" data-rawheight=\"776\" data-original=\"https:\/\/pic3.zhimg.com\/v2-42272fd4e389da72377afe0a46690720_r.jpg?source=1940ef5c\" data-actualsrc=\"https:\/\/pic1.zhimg.com\/50\/v2-42272fd4e389da72377afe0a46690720_720w.jpg?source=1940ef5c\" data-lazy-status=\"ok\" \/><\/figure>\n<p data-pid=\"y0vdZyHR\">\u8fd9\u4e5f\u662f\u00a0<code>Wasm<\/code>\u00a0\u5b98\u65b9\u5ba3\u4f20\u7684\u00a0<code>Ending<\/code>\u00a0\u5b9a\u5f8b\uff0c<i>Any application that can be compiled to WebAssembly, will be compiled to WebAssembly eventually.<\/i><\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p data-pid=\"pv876FcO\">\u6b64\u65f6\u56de\u987e\u4e00\u4e0b\uff0c<code>WebAssebmly<\/code>\u00a0\u7684\u5b9a\u4e49\uff0c\u5e94\u8be5\u4f1a\u6e05\u6670\u5f88\u591a\u4e86\u3002<\/p>\n<blockquote data-pid=\"K0SSYSCq\"><p>WebAssembly (abbreviated\u00a0<i>Wasm<\/i>) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications.<\/p><\/blockquote>\n<p data-pid=\"Rdg818AH\">\u5b83\u4e0d\u662f\u4e00\u79cd\u8bed\u8a00\uff0c\u800c\u662f\u89c4\u5b9a\u4e86\u4e00\u79cd\u865a\u62df\u6307\u4ee4\u96c6\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u5404\u4e2a\u8bed\u8a00\u7684\u7f16\u8bd1\u76ee\u6807\uff0c\u7136\u540e\u901a\u8fc7\u00a0<code>wasm<\/code>\u00a0\u7684\u865a\u62df\u673a\u8fd0\u884c\u5230\u6d4f\u89c8\u5668\u8fd8\u6709\u5176\u4ed6\u5404\u4e2a\u5e73\u53f0\u4e2d\u3002<\/p>\n<p data-pid=\"mG5AJ4ws\">\u5bf9\u4e8e\u524d\u7aef\u9886\u57df\uff0c\u5f53\u524d\u00a0<code>Webassembly<\/code>\u00a0\u5728\u67d0\u4e9b\u573a\u666f\u4e0b\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u524d\u7aef\u9879\u76ee\u7684\u6027\u80fd\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06\u00a0<code>C\/C++<\/code>\u00a0\u9886\u57df\u7684\u4e00\u4e9b\u4f18\u79c0\u7684\u5e93\u901a\u8fc7\u7f16\u8bd1\u76f4\u63a5\u8fd0\u884c\u5230\u6d4f\u89c8\u5668\u4e2d\u3002\u5982\u679c\u524d\u7aef\u9047\u5230\u4e86\u6027\u80fd\u7684\u95ee\u9898\uff0c\u4e0d\u59a8\u53ef\u4ee5\u8003\u8651\u4e0b\u00a0<code>WebAssmbly<\/code>\u00a0\u7684\u65b9\u6848\u3002<\/p>\n<h2>\u53c2\u8003\u94fe\u63a5<\/h2>\n<p data-pid=\"YW-0UU48\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/developer.ibm.com\/zh\/technologies\/web-development\/articles\/wa-lo-webassembly-status-and-reality\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">WebAssembly \u73b0\u72b6\u4e0e\u5b9e\u6218<\/a><\/p>\n<p data-pid=\"GsfXRy_0\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/dev.to\/oayomide\/webassembly-another-jvm-4g79\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">WebAssembly: another JVM?<\/a><\/p>\n<p data-pid=\"FivQnYDk\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/medium.com\/%40mikevdg\/why-webassembly-is-a-big-deal-a308d72c6de1\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">Why WebAssembly is a Big Deal<\/a><\/p>\n<p data-pid=\"cglT1ot2\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/github.com\/appcypher\/awesome-wasm-langs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">Awesome WebAssembly Languages<\/a><\/p>\n<p data-pid=\"VwA9vRnu\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/time.geekbang.org\/column\/intro\/100059901%3Fcode%3Dy9watqWBWzgfBrz1HyzOV9ktX8sAuL5W3ZLtRRJnaV4%253D\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u6781\u5ba2\u65f6\u95f4WebAssembly\u5165\u95e8\u8bfe<\/a>\uff0c\u5f88\u7cfb\u7edf\uff0c\u5f3a\u70c8\u63a8\u8350<\/p>\n<p data-pid=\"0LTYXL-F\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.ruanyifeng.com\/blog\/2018\/01\/assembly-language-primer.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">\u6c47\u7f16\u8bed\u8a00\u5165\u95e8\u6559\u7a0b<\/a><\/p>\n<p data-pid=\"U0X_nPcq\"><a class=\" wrap external\" href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/www.infoq.cn\/article\/vc%2Aq7psQqWMaVU8igJeD\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-za-detail-view-id=\"1043\">WebAssembly\u5728eBay\u7684\u5b9e\u8df5\uff1a\u901f\u5ea6\u63d0\u534750\u500d<\/a><\/p>\n<\/div>\n<div>\n<div class=\"ContentItem-time\"><a href=\"https:\/\/www.zhihu.com\/question\/304577684\/answer\/1961085507\" target=\"_blank\" rel=\"noopener\"><span data-tooltip=\"\u53d1\u5e03\u4e8e 2021-06-25 20:23\" aria-label=\"\u53d1\u5e03\u4e8e 2021-06-25 20:23\">\u53d1\u5e03\u4e8e 2021-06-25 20:23<\/span><\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 \u4e4b\u524d\u603b\u7ed3\u7684\uff0c\u5206\u4eab\u4e00\u4e0b\u3002 win<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[24],"tags":[121],"class_list":["post-5736","post","type-post","status-publish","format-standard","hentry","category-value_docs","tag-05-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=5736"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5736\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=5736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=5736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=5736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}