{"id":6954,"date":"2019-12-23T01:00:00","date_gmt":"2019-12-23T01:00:00","guid":{"rendered":"https:\/\/gtechbooster.com\/?p=6954"},"modified":"2023-04-01T01:36:47","modified_gmt":"2023-04-01T01:36:47","slug":"w3c-adopts-webassembly","status":"publish","type":"post","link":"https:\/\/gtechbooster.com\/w3c-adopts-webassembly\/","title":{"rendered":"W3C adopts WebAssembly"},"content":{"rendered":"\n<p>WebAssembly has been adopted by W3C and is now an official web standard. This doesn&#8217;t mean it is ready to use, however. <\/p>\n\n\n\n<div class=\"gtech-migrated-from-ad-inserter-placement-2\" style=\"text-align: center;\" id=\"gtech-3872014538\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-3347223367\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/76065\" rel=\"noopener\" class=\"notrack\" aria-label=\"26002\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2025\/10\/26002.jpg\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2025\/10\/26002.jpg 1200w, https:\/\/gtechbooster.com\/media\/2025\/10\/26002-768x768.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" width=\"500\" height=\"500\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div><p>The saga of WebAssembly will probably mystify programmers in years to  come. We have browsers that have &#8220;native&#8221; JavaScript support and this  has been refined and evolved over the years. Most programmers don&#8217;t like  JavaScript for a range of reasons &#8211; it&#8217;s not elegant, it&#8217;s not class  based, it&#8217;s weakly typed and it&#8217;s slow. Over time there have also been  attempts to allow programmers to write in their language of choice and  have this run in the browser. <\/p>\n\n\n\n<p>While compiling to JavaScript does nothing  much for speed, Google&#8217;s NaCL which allowed programs to be compiled  into native code, permitted running at full speed.\u00a0 This seemed like a  better idea, but no one wanted to get behind Google on this one. Later  Google implemented a platform-independent version of NaCL\u00a0, however it  had no more success in being adopted.<\/p>\n\n\n\n<p>The next suggestion was to invent a sub-set of JavaScript that could \nbe used as a browser assembly language &#8211; asm JS.This worked but perhaps \nnot with the speed up that was hoped for.<\/p>\n\n\n\n<p>The final approach was to think of implementing a new language that  could coexist with JavaScript. This idea involved of a whole new  lowish-level language based on syntax trees. The advantage of a language  based on syntax trees is that it makes the code quick to execute and  you can choose a range of architectures to implement it &#8211; for example a  stack machine, which is slow but easy to implement. <\/p>\n\n\n\n<p>An alternative would  have been to adopt, say, the Java VM and take advantage of the existing  compilers and tools. I can see why the web community might not have  wanted to use anything connected with Oracle&#8217;s approach to Java, but  there are alternatives.<\/p>\n\n\n\n<p>Instead what we have is a brand new ecosystem that has to be \npopulated with new tools and at the moment there aren&#8217;t very many and \nthey are difficult to use. It is clearly going to be some time yet \nbefore WebAssembly goes mainstream.<\/p><div class=\"gtech-mid-cont\" style=\"text-align: center;\" id=\"gtech-455333416\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-524083796\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/75343\" rel=\"noopener\" class=\"notrack\" aria-label=\"jesdphis\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2025\/08\/jesdphis.avif\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2025\/08\/jesdphis.avif 1179w, https:\/\/gtechbooster.com\/media\/2025\/08\/jesdphis-768x950.avif 768w\" sizes=\"(max-width: 1179px) 100vw, 1179px\" width=\"300\" height=\"300\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div>\n\n\n\n<p>To be clear &#8211; you aren&#8217;t going to be writing your code in \nWebAssembly. You are going to be writing in Python, Julia, R or C and \nusing a compiler to create WebAssembly. The problem is that at the \nmoment the compilers and the associated infrastructure isn&#8217;t well \ndeveloped enough for you to get a junior programmer to do the job. \nUltimately it has to get this simple and this polished for WebAssembly \nto be widely used.<\/p>\n\n\n\n<p>Another interesting choice is the fact that you still cannot dispense  with JavaScript. If you hate it then get used to the idea that  JavaScript is still very much part of WebAssembly. You need JavaScript  to marshal WebAssembly and talk to the UI. A one-language solution is  now no longer possible if you want maximum performance. You still have  to write substantial parts of any application in JavaScript. The reason  for this is supposed to be that having JavaScript handle the outside  world makes use of JavaScript&#8217;s security mechanisms. <\/p>\n\n\n\n<p>This might provoke a  hollow laugh as not only is JavaScript capable of being subverted,  adding WebAssembly to it makes things more complicated and hence more  vulnerable. The attack surface has just been enlarged. Complexity is the  friend of malware.<\/p>\n\n\n\n<p>It is not just the browser that WebAssembly hopes to shake up. The \nidea is to extend the standard to include environments that WebAssembly \ncan be run under. So I guess the idea is to make it a viable target for \nevery language on the planet, running on every platform on the planet. \nSounds unlikely to me.<\/p>\n\n\n\n<p>I can&#8217;t help but think that in a few years programmers will see this \nas a missed opportunity. WebAssembly has many things that are \nattractive, but the way that it extends JavaScript and has to interwork \nwith it is undesirably complex.<\/p>\n\n\n\n<p>We could have implemented something completely new and completely  simple and allowed JavaScript to co-exist or wither depending on the  will of the world.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More information<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li> <a rel=\"noreferrer noopener\" href=\"https:\/\/www.w3.org\/2019\/12\/pressrelease-wasm-rec.html.en\" target=\"_blank\">World Wide Web Consortium (W3C) brings a new language to the Web as WebAssembly becomes a W3C Recommendation<\/a> <\/li><\/ul>\n<div class=\"gtech-end-cont\" id=\"gtech-4225801999\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-74492806\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/17207\" rel=\"noopener\" class=\"notrack\" aria-label=\"26001\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg 1024w, https:\/\/gtechbooster.com\/media\/2023\/01\/26001-768x960.jpeg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"500\" height=\"625\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>WebAssembly has been adopted by W3C and is now an official web standard. This doesn&#8217;t mean it is ready to use, however. The saga of WebAssembly will probably mystify programmers in years to come. We have browsers that have &#8220;native&#8221; JavaScript support and this has been refined and evolved over the years. Most programmers don&#8217;t [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":6955,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1915],"tags":[10,6,862],"class_list":["post-6954","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ndocs","tag-javascript","tag-programming","tag-world-wide-web-consortium"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts\/6954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/comments?post=6954"}],"version-history":[{"count":0,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts\/6954\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/media\/6955"}],"wp:attachment":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/media?parent=6954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/categories?post=6954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/tags?post=6954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}