1<!DOCTYPE html><html lang="en"><head>
1<script>if (typeof window !== "undefined" && navigator.serviceWorker) { navigator.serviceWorker.getRegistrations().then(function(registrations) { for (let registration of registrations) { registration.unregister(); } });}</script>
1<meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><link rel="preload" href="/component---src-layouts-index-js-834a063f3bdab534994d.js" as="script"/><link rel="preload" href="/component---src-templates-blog-post-js-b7034c2908d4eabf5b27.js" as="script"/><link rel="preload" href="/path---why-webassembly-68fe783956f80376d169.js" as="script"/><link rel="preload" href="/app-6b321113b6b3d492c203.js" as="script"/><link rel="preload" href="/commons-29fe1b9a110c51e997ae.js" as="script"/><link rel="alternate" type="application/rss+xml" href="/rss.xml"/><title data-react-helmet="true">How WebAssembly changes software distribution | Max Desiatov</title><link data-react-helmet="true" rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"/><link data-react-helmet="true" rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link data-react-helmet="true" rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link data-react-helmet="true" rel="apple-touch-icon" href="/apple-icon-270x270.png"/><link data-react-helmet="true" rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"/><link data-react-helmet="true" rel="canonical" href="https://desiatov.com/why-webassembly/"/><meta data-react-helmet="true" property="og:title" content="How WebAssembly changes software distribution | Max Desiatov"/><meta data-react-helmet="true" name="description" content="Thanks to the open nature of the whole stack WebAssembly is arguably much closer to âwrite once, run anywhereâ than Java/JVM ever was."/><meta data-react-helmet="true" property="og:description" content="Thanks to the open nature of the whole stack WebAssembly is arguably much closer to âwrite once, run anywhereâ than Java/JVM ever was."/><meta data-react-helmet="true" property="og:url" content="https://desiatov.com/why-webassembly/"/><meta data-react-helmet="true" property="og:image" content="https://desiatov.com/static/activex-0f260342e5426a0cc883966575235fe3.gif"/><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"/><meta data-react-helmet="true" name="twitter:description" content="Thanks to the open nature of the whole stack WebAssembly is arguably much closer to âwrite once, run anywhereâ than Java/JVM ever was."/><meta data-react-helmet="true" name="twitter:title" content="How WebAssembly changes software distribution | Max Desiatov"/><style id="typography.js">html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}[hidden],template{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}html{font:100%/1.75 'Merriweather','Georgia',serif;box-sizing:border-box;overflow-y:scroll;}*{box-sizing:inherit;}*:before{box-sizing:inherit;}*:after{box-sizing:inherit;}body{color:hsla(0,0%,0%,0.9);font-family:'Merriweather','Georgia',serif;font-weight:400;word-wrap:break-word;font-kerning:normal;-moz-font-feature-settings:"kern", "liga", "clig", "calt";-ms-font-feature-settings:"kern", "liga", "clig", "calt";-webkit-font-feature-settings:"kern", "liga", "clig", "calt";font-feature-settings:"kern", "liga", "clig", "calt";}img{max-width:100%;margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}h1{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;color:inherit;font-family:Montserrat,sans-serif;font-weight:900;text-rendering:optimizeLegibility;font-size:2.5rem;line-height:1.1;}h2{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;color:inherit;font-family:'Merriweather','Georgia',serif;font-weight:900;text-rendering:optimizeLegibility;font-size:1.73286rem;line-height:1.1;}h3{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;color:inherit;font-family:'Merriweather','Georgia',serif;font-weight:900;text-rendering:optimizeLegibility;font-size:1.4427rem;line-height:1.1;}h4{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;color:inherit;font-family:'Merriweather','Georgia',serif;font-weight:900;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.1;letter-spacing:0.140625em;text-transform:uppercase;}h5{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;color:inherit;font-family:'Merriweather','Georgia',serif;font-weight:900;text-rendering:optimizeLegibility;font-size:0.83255rem;line-height:1.1;}h6{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;color:inherit;font-family:'Merriweather','Georgia',serif;font-weight:900;text-rendering:optimizeLegibility;font-size:0.75966rem;line-height:1.1;font-style:italic;}hgroup{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}ul{margin-left:1.75rem;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;list-style-position:outside;list-style-image:none;list-style:disc;}ol{margin-left:1.75rem;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;list-style-position:outside;list-style-image:none;}dl{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}dd{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}p{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}figure{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}pre{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;font-size:0.85rem;line-height:1.75rem;}table{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;font-size:1rem;line-height:1.75rem;border-collapse:collapse;width:100%;}fieldset{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}blockquote{margin-left:-1.75rem;margin-right:1.75rem;margin-top:0;padding-bottom:0;padding-left:1.42188rem;padding-right:0;padding-top:0;margin-bottom:1.75rem;font-size:1.20112rem;line-height:1.75rem;color:hsla(0,0%,0%,0.59);font-style:italic;border-left:0.32813rem solid hsla(0,0%,0%,0.9);}form{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}noscript{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}iframe{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}hr{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:calc(1.75rem - 1px);background:hsla(0,0%,0%,0.2);border:none;height:1px;}address{margin-left:0;margin-right:0;margin-top:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;margin-bottom:1.75rem;}b{font-weight:700;}strong{font-weight:700;}dt{font-weight:700;}th{font-weight:700;}li{margin-bottom:calc(1.75rem / 2);}ol li{padding-left:0;}ul li{padding-left:0;}li > ol{margin-left:1.75rem;margin-bottom:calc(1.75rem / 2);margin-top:calc(1.75rem / 2);}li > ul{margin-left:1.75rem;margin-bottom:calc(1.75rem / 2);margin-top:calc(1.75rem / 2);}blockquote *:last-child{margin-bottom:0;}li *:last-child{margin-bottom:0;}p *:last-child{margin-bottom:0;}li > p{margin-bottom:calc(1.75rem / 2);}code{font-size:0.85rem;line-height:1.75rem;}kbd{font-size:0.85rem;line-height:1.75rem;}samp{font-size:0.85rem;line-height:1.75rem;}abbr{border-bottom:1px dotted hsla(0,0%,0%,0.5);
1cursor:help;}acronym{border-bottom:1px dotted hsla(0,0%,0%,0.5);cursor:help;}abbr[title]{border-bottom:1px dotted hsla(0,0%,0%,0.5);cursor:help;text-decoration:none;}thead{text-align:left;}td,th{text-align:left;border-bottom:1px solid hsla(0,0%,0%,0.12);font-feature-settings:"tnum";-moz-font-feature-settings:"tnum";-ms-font-feature-settings:"tnum";-webkit-font-feature-settings:"tnum";padding-left:1.16667rem;padding-right:1.16667rem;padding-top:0.875rem;padding-bottom:calc(0.875rem - 1px);}th:first-child,td:first-child{padding-left:0;}th:last-child,td:last-child{padding-right:0;}blockquote > :last-child{margin-bottom:0;}blockquote cite{font-size:1rem;line-height:1.75rem;color:hsla(0,0%,0%,0.9);font-weight:400;}blockquote cite:before{content:"â ";}ul,ol{margin-left:0;}@media only screen and (max-width:480px){ul,ol{margin-left:1.75rem;}blockquote{margin-left:-1.3125rem;margin-right:0;padding-left:0.98438rem;}}h1,h2,h3,h4,h5,h6{margin-top:3.5rem;}a{box-shadow:0 1px 0 0 currentColor;color:#007acc;text-decoration:none;}a:hover,a:active{box-shadow:none;}mark,ins{background:#007acc;color:white;padding:0.10938rem 0.21875rem;text-decoration:none;}a.gatsby-resp-image-link{box-shadow:none;}</style><style id="gatsby-inlined-css">@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:100;src:local("Montserrat Thin "),local("Montserrat-Thin"),url(/static/montserrat-latin-100.191cc9f5.woff2) format("woff2"),url(/static/montserrat-latin-100.37031846.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:100;src:local("Montserrat Thin italic"),local("Montserrat-Thinitalic"),url(/static/montserrat-latin-100italic.bdeaeb79.woff2) format("woff2"),url(/static/montserrat-latin-100italic.ecf7d493.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:200;src:local("Montserrat Extra Light "),local("Montserrat-Extra Light"),url(/static/montserrat-latin-200.85d5ef9d.woff2) format("woff2"),url(/static/montserrat-latin-200.1fc98e12.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:200;src:local("Montserrat Extra Light italic"),local("Montserrat-Extra Lightitalic"),url(/static/montserrat-latin-200italic.49095760.woff2) format("woff2"),url(/static/montserrat-latin-200italic.fe46cf8b.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:300;src:local("Montserrat Light "),local("Montserrat-Light"),url(/static/montserrat-latin-300.7c3daf12.woff2) format("woff2"),url(/static/montserrat-latin-300.8dc95fab.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:300;src:local("Montserrat Light italic"),local("Montserrat-Lightitalic"),url(/static/montserrat-latin-300italic.f20b178c.woff2) format("woff2"),url(/static/montserrat-latin-300italic.3fe16939.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:400;src:local("Montserrat Regular "),local("Montserrat-Regular"),url(/static/montserrat-latin-400.bc3aa95d.woff2) format("woff2"),url(/static/montserrat-latin-400.8102c483.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:400;src:local("Montserrat Regular italic"),local("Montserrat-Regularitalic"),url(/static/montserrat-latin-400italic.5cad6504.woff2) format("woff2"),url(/static/montserrat-latin-400italic.d191f22a.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:500;src:local("Montserrat Medium "),local("Montserrat-Medium"),url(/static/montserrat-latin-500.92d16e45.woff2) format("woff2"),url(/static/montserrat-latin-500.8b763220.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:500;src:local("Montserrat Medium italic"),local("Montserrat-Mediumitalic"),url(/static/montserrat-latin-500italic.47bfcca6.woff2) format("woff2"),url(/static/montserrat-latin-500italic.72c01f75.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:600;src:local("Montserrat SemiBold "),local("Montserrat-SemiBold"),url(/static/montserrat-latin-600.6fb1b562.woff2) format("woff2"),url(/static/montserrat-latin-600.7c839d15.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:600;src:local("Montserrat SemiBold italic"),local("Montserrat-SemiBolditalic"),url(/static/montserrat-latin-600italic.60789af1.woff2) format("woff2"),url(/static/montserrat-latin-600italic.f3d4de8d.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:700;src:local("Montserrat Bold "),local("Montserrat-Bold"),url(/static/montserrat-latin-700.39d93cf6.woff2) format("woff2"),url(/static/montserrat-latin-700.80f10bd3.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:700;src:local("Montserrat Bold italic"),local("Montserrat-Bolditalic"),url(/static/montserrat-latin-700italic.ba136d97.woff2) format("woff2"),url(/static/montserrat-latin-700italic.8c98142b.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:800;src:local("Montserrat ExtraBold "),local("Montserrat-ExtraBold"),url(/static/montserrat-latin-800.b7018be9.woff2) format("woff2"),url(/static/montserrat-latin-800.9a9befcf.woff) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:800;src:local("Montserrat ExtraBold italic"),local("Montserrat-ExtraBolditalic"),url(/static/montserrat-latin-800italic.540ffdd2.woff2) format("woff2"),url(/static/montserrat-latin-800italic.897086f9.woff) format("woff")}@font-face{font-family:Montserrat;font-style:normal;font-display:swap;font-weight:900;src:local("Montserrat Black "),local("Montserrat-Black"),url(/static/montserrat-latin-900.58cd7897.woff2) format("woff2"),url(/static/montserrat-latin-900.26d42c94.w
1off) format("woff")}@font-face{font-family:Montserrat;font-style:italic;font-display:swap;font-weight:900;src:local("Montserrat Black italic"),local("Montserrat-Blackitalic"),url(/static/montserrat-latin-900italic.451157bc.woff2) format("woff2"),url(/static/montserrat-latin-900italic.a8ec4957.woff) format("woff")}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:300;src:local("Merriweather Light "),local("Merriweather-Light"),url(/static/merriweather-latin-300.b1158cfc.woff2) format("woff2"),url(/static/merriweather-latin-300.cc7de05e.woff) format("woff")}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:300;src:local("Merriweather Light italic"),local("Merriweather-Lightitalic"),url(/static/merriweather-latin-300italic.8fe52a48.woff2) format("woff2"),url(/static/merriweather-latin-300italic.e1331f53.woff) format("woff")}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:400;src:local("Merriweather Regular "),local("Merriweather-Regular"),url(/static/merriweather-latin-400.8276fdb7.woff2) format("woff2"),url(/static/merriweather-latin-400.69f09800.woff) format("woff")}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:400;src:local("Merriweather Regular italic"),local("Merriweather-Regularitalic"),url(/static/merriweather-latin-400italic.3a9be9ea.woff2) format("woff2"),url(/static/merriweather-latin-400italic.d76079ed.woff) format("woff")}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:700;src:local("Merriweather Bold "),local("Merriweather-Bold"),url(/static/merriweather-latin-700.fa534be7.woff2) format("woff2"),url(/static/merriweather-latin-700.ba56ea84.woff) format("woff")}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:700;src:local("Merriweather Bold italic"),local("Merriweather-Bolditalic"),url(/static/merriweather-latin-700italic.1ef5edaa.woff2) format("woff2"),url(/static/merriweather-latin-700italic.534bc9e7.woff) format("woff")}@font-face{font-family:Merriweather;font-style:normal;font-display:swap;font-weight:900;src:local("Merriweather Black "),local("Merriweather-Black"),url(/static/merriweather-latin-900.7528fb70.woff2) format("woff2"),url(/static/merriweather-latin-900.3799b6e2.woff) format("woff")}@font-face{font-family:Merriweather;font-style:italic;font-display:swap;font-weight:900;src:local("Merriweather Black italic"),local("Merriweather-Blackitalic"),url(/static/merriweather-latin-900italic.e1b4d2aa.woff2) format("woff2"),url(/static/merriweather-latin-900italic.2ae22f73.woff) format("woff")}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:transparent}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;
1margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-feature-settings:"calt";font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}code{font-feature-settings:"liga" off;font-family:Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace;margin-left:.15rem;margin-right:.15rem}div.gatsby-highlight{overflow:auto}pre.cm-s-xcode{margin-bottom:1.5rem;word-wrap:normal}h1 a{box-shadow:none}h2{line-height:1.2}.cm-s-xcode .cm-header{color:blue}.cm-s-xcode .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-xcode .cm-keyword{color:#708}.cm-s-xcode .cm-atom{color:#219}.cm-s-xcode .cm-number{color:#164}.cm-s-xcode .cm-def{color:#00f}.cm-s-xcode .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-xcode .cm-variable-3{color:#085}.cm-s-xcode .cm-comment{color:#a50}.cm-s-xcode .cm-string{color:#a11}.cm-s-xcode .cm-string-2{color:#f50}.cm-s-xcode .cm-meta,.cm-s-xcode .cm-qualifier{color:#555}.cm-s-xcode .cm-builtin{color:#30a}.cm-s-xcode .cm-bracket{color:#997}.cm-s-xcode .cm-tag{color:#170}.cm-s-xcode .cm-attribute{color:#00c}.cm-s-xcode .cm-hr{color:#999}.cm-s-xcode .cm-link{color:#00c}.cm-invalidchar,.cm-s-xcode .cm-error{color:red}</style></head><body><div id="___gatsby"><div style="margin-left:auto;margin-right:auto;max-width:42rem;padding:2.625rem 1.3125rem;" data-reactroot="" data-reactid="1" data-react-checksum="-1891290951"><header data-reactid="2"><center data-reactid="3"><div style="font-size:3.60675rem;line-height:4.375rem;font-family:Montserrat,sans-serif;font-weight:900;margin-bottom:2.625rem;margin-top:0;" data-reactid="4"><a style="box-shadow:none;text-decoration:none;color:inherit;" href="/" data-reactid="5">Max Desiatov</a></div></center><div style="margin-bottom:2.625rem;" data-reactid="6"><img src="/static/profile-pic.3cc2b7a0.jpg" alt="Max Desiatov" style="float:left;margin-right:0.875rem;margin-bottom:0.4375rem;width:5.25rem;border-radius:5.25rem;height:5.25rem;" data-reactid="7"/><span data-reactid="8"><!-- react-text: 9 -->I'm <!-- /react-text --><strong data-reactid="10">Max Desiatov</strong><!-- react-text: 11 -->, a Ukrainian software engineer.<!-- /react-text --></span></div><nav data-reactid="12"><div style="margin-top:0.4375rem;display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap;" data-reactid="13"><div style="margin-top:0.4375rem;display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap;" data-reactid="14"><span style="font-family:Montserrat,sans-serif;font-weight:900;margin-left:0.175rem;margin-right:0.175rem;font-size:1.6625rem;margin-top:0.4375rem;margin-bottom:0;" data-reactid="15"><a style="margin-right:0.875rem;" href="/" data-reactid="16">Blog</a></span></div><div style="margin-top:0.875rem;margin-left:0.875rem;display:flex;justify-content:space-between;" data-reactid="17"><a title="RSS" href="/rss.xml" style="box-shadow:none;margin-right:0.875rem;" data-reactid="18"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="rss-square" class="svg-inline--fa fa-rss-square fa-w-14 fa-2x " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-reactid="19">
1<path fill="currentColor" d="M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM112 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm157.533 0h-34.335c-6.011 0-11.051-4.636-11.442-10.634-5.214-80.05-69.243-143.92-149.123-149.123-5.997-.39-10.633-5.431-10.633-11.441v-34.335c0-6.535 5.468-11.777 11.994-11.425 110.546 5.974 198.997 94.536 204.964 204.964.352 6.526-4.89 11.994-11.425 11.994zm103.027 0h-34.334c-6.161 0-11.175-4.882-11.427-11.038-5.598-136.535-115.204-246.161-251.76-251.76C68.882 152.949 64 147.935 64 141.774V107.44c0-6.454 5.338-11.664 11.787-11.432 167.83 6.025 302.21 141.191 308.205 308.205.232 6.449-4.978 11.787-11.432 11.787z" data-reactid="20"></path></svg></a><a title="GitHub" href="https://github.com/maxdesiatov" style="box-shadow:none;margin-right:0.875rem;" data-reactid="21"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="github-square" class="svg-inline--fa fa-github-square fa-w-14 fa-2x " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-reactid="22"><path fill="currentColor" d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM277.3 415.7c-8.4 1.5-11.5-3.7-11.5-8 0-5.4.2-33 .2-55.3 0-15.6-5.2-25.5-11.3-30.7 37-4.1 76-9.2 76-73.1 0-18.2-6.5-27.3-17.1-39 1.7-4.3 7.4-22-1.7-45-13.9-4.3-45.7 17.9-45.7 17.9-13.2-3.7-27.5-5.6-41.6-5.6-14.1 0-28.4 1.9-41.6 5.6 0 0-31.8-22.2-45.7-17.9-9.1 22.9-3.5 40.6-1.7 45-10.6 11.7-15.6 20.8-15.6 39 0 63.6 37.3 69 74.3 73.1-4.8 4.3-9.1 11.7-10.6 22.3-9.5 4.3-33.8 11.7-48.3-13.9-9.1-15.8-25.5-17.1-25.5-17.1-16.2-.2-1.1 10.2-1.1 10.2 10.8 5 18.4 24.2 18.4 24.2 9.7 29.7 56.1 19.7 56.1 19.7 0 13.9.2 36.5.2 40.6 0 4.3-3 9.5-11.5 8-66-22.1-112.2-84.9-112.2-158.3 0-91.8 70.2-161.5 162-161.5S388 165.6 388 257.4c.1 73.4-44.7 136.3-110.7 158.3zm-98.1-61.1c-1.9.4-3.7-.4-3.9-1.7-.2-1.5 1.1-2.8 3-3.2 1.9-.2 3.7.6 3.9 1.9.3 1.3-1 2.6-3 3zm-9.5-.9c0 1.3-1.5 2.4-3.5 2.4-2.2.2-3.7-.9-3.7-2.4 0-1.3 1.5-2.4 3.5-2.4 1.9-.2 3.7.9 3.7 2.4zm-13.7-1.1c-.4 1.3-2.4 1.9-4.1 1.3-1.9-.4-3.2-1.9-2.8-3.2.4-1.3 2.4-1.9 4.1-1.5 2 .6 3.3 2.1 2.8 3.4zm-12.3-5.4c-.9 1.1-2.8.9-4.3-.6-1.5-1.3-1.9-3.2-.9-4.1.9-1.1 2.8-.9 4.3.6 1.3 1.3 1.8 3.3.9 4.1zm-9.1-9.1c-.9.6-2.6 0-3.7-1.5s-1.1-3.2 0-3.9c1.1-.9 2.8-.2 3.7 1.3 1.1 1.5 1.1 3.3 0 4.1zm-6.5-9.7c-.9.9-2.4.4-3.5-.6-1.1-1.3-1.3-2.8-.4-3.5.9-.9 2.4-.4 3.5.6 1.1 1.3 1.3 2.8.4 3.5zm-6.7-7.4c-.4.9-1.7 1.1-2.8.4-1.3-.6-1.9-1.7-1.5-2.6.4-.6 1.5-.9 2.8-.4 1.3.7 1.9 1.8 1.5 2.6z" data-reactid="23"></path></svg></a><a rel="me" title="Mastodon" href="https://mastodon.social/@maxd" style="box-shadow:none;margin-right:0.875rem;" data-reactid="24"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="mastodon" class="svg-inline--fa fa-mastodon fa-w-14 fa-2x " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-reactid="25"><path fill="currentColor" d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z" data-reactid="26"></path></svg></a></div></div></nav></header><div data-reactid="27"><!-- react-empty: 28 --><a name="title" style="color:black;" data-reactid="29"><h1 style="margin-bottom:0.4375rem;" data-reactid="30">How WebAssembly changes software distribution</h1></a><small style="display:block;margin-bottom:1.75rem;" data-reactid="31">09 September, 2020</small><div data-reactid="32"><p>If you had any experience with Windows and Internet Explorer in the 90s, 2quite probably you remember <a href="https://en.wikipedia.org/wiki/ActiveX">ActiveX</a> controls. Most 3frequently this involved bulky popups on pages with these controls having to display something 4more complex than a few blocks of text.</p> 5<p><img src="/activex-0f260342e5426a0cc883966575235fe3.gif" alt="Internet Explorer displaying an alert that requires ActiveX controls to be installed"></p> 6<p>Or, remember <a href="https://en.wikipedia.org/wiki/Java_applet">Java applets</a>? They became 7available in 1995, and later they werenât limited to just Windows and Internet Explorer. I remember 8I had to use Java applets on macOS as recently as 2013, which chronologically is closer to the 9present time than the 90s are. (Feeling so old anyway! ð´)</p> 10<p> 11 <a 12 class="gatsby-resp-image-link" 13 href="/static/java-d07ca75d3ee42f845ec400952480dcd3-86a48.jpg" 14 style="display: block" 15 target="_blank" 16 rel="noopener" 17 > 18 19 <span 20 class="gatsby-resp-image-wrapper" 21 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 22 > 23 <span 24 class="gatsby-resp-image-background-image" 25 style="padding-bottom: 60.57692307692308%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAMABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAIBBf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/aAAwDAQACEAMQAAAB6dUZNZf/xAAZEAACAwEAAAAAAAAAAAAAAAAAEgECESH/2gAIAQEAAQUCmvcMGGkY/8QAFREBAQAAAAAAAAAAAAAAAAAAEBH/2gAIAQMBAT8Bh//EABURAQEAAAAAAAAAAAAAAAAAAAAh/9oACAECAQE/AVf/xAAVEAEBAAAAAAAAAAAAAAAAAAAgMf/aAAgBAQAGPwKL/8QAGRAAAgMBAAAAAAAAAAAAAAAAAAEQEWHw/9oACAEBAAE/IeBizG0Fj//aAAw
25DAQACAAMAAAAQ8y//xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAIAQMBAT8QhMf/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAIAQIBAT8Quqf/xAAcEAACAgIDAAAAAAAAAAAAAAAAAREhcZFBYYH/2gAIAQEAAT8QZOGadzIeuM+mKIarQurRh0f/2Q=='); background-size: cover; display: block;" 26 > 27 <img 28 class="gatsby-resp-image-image" 29 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 30 alt="Microsoft's Application and Network Access Portal that displays a warning about user's browser not 31allowing Java applets to run" 32 title="" 33 src="/static/java-d07ca75d3ee42f845ec400952480dcd3-f8fb9.jpg" 34 srcset="/static/java-d07ca75d3ee42f845ec400952480dcd3-e8976.jpg 148w, 35/static/java-d07ca75d3ee42f845ec400952480dcd3-63df2.jpg 295w, 36/static/java-d07ca75d3ee42f845ec400952480dcd3-f8fb9.jpg 590w, 37/static/java-d07ca75d3ee42f845ec400952480dcd3-86a48.jpg 624w" 38 sizes="(max-width: 590px) 100vw, 590px" 39 /> 40 </span> 41 </span> 42 43 </a> 44 </p> 45<p>Seems like ActiveX and Java applets were necessities mostly in the enterprise world, but 46Macromedia Flash (later known as <a href="https://en.wikipedia.org/wiki/Adobe_Flash">Adobe Flash</a>) 47was certainly much more widely known to consumers. It was a requirement in the early days of streaming 48video (even <a href="https://www.theverge.com/2015/1/27/7926001/youtube-drops-flash-for-html5-video-default">YouTube required 49Flash</a> 50to work back then!), but also a major driver in browser gaming in late 2000s and early 2010s. 51We certainly could blame Flash for making our browser windows look like this:</p> 52<p> 53 <a 54 class="gatsby-resp-image-link" 55 href="/static/flash-38961528058b4baa72341cf48381d93c-02110.jpg" 56 style="display: block" 57 target="_blank" 58 rel="noopener" 59 > 60 61 <span 62 class="gatsby-resp-image-wrapper" 63 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 64 > 65 <span 66 class="gatsby-resp-image-background-image" 67 style="padding-bottom: 63.20132013201321%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAP/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAGoAP/EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCX//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CX//EABYQAAMAAAAAAAAAAAAAAAAAAAAggf/aAAgBAQABPyEi/wD/2gAMAwEAAgADAAAAEDPP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGRAAAgMBAAAAAAAAAAAAAAAAAREQMUEA/9oACAEBAAE/ECVj4PUlk2aj/9k='); background-size: cover; display: block;" 68 > 69 <img 70 class="gatsby-resp-image-image" 71 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 72 alt="Browser page warning about Adobe Flash Player not being installed" 73 title="" 74 src="/static/flash-38961528058b4baa72341cf48381d93c-f8fb9.jpg" 75 srcset="/static/flash-38961528058b4baa72341cf48381d93c-e8976.jpg 148w, 76/static/flash-38961528058b4baa72341cf48381d93c-63df2.jpg 295w, 77/static/flash-38961528058b4baa72341cf48381d93c-f8fb9.jpg 590w, 78/static/flash-38961528058b4baa72341cf48381d93c-02110.jpg 606w" 79 sizes="(max-width: 590px) 100vw, 590px" 80 /> 81 </span> 82 </span> 83 84 </a> 85 </p> 86<p>While ActiveX has seemingly failed to reach a significant adoption, Microsoft made yet another 87attempt with <a href="https://en.wikipedia.org/wiki/Microsoft_Silverlight">Silverlight</a>:</p> 88<p> 89 <a 90 class="gatsby-resp-image-link" 91 href="/static/silverlight-b8600e7fe201dbc24998a9aacecd3684-da6d6.jpg" 92 style="display: block" 93 target="_blank" 94 rel="noopener" 95 > 96 97 <span 98 class="gatsby-resp-image-wrapper" 99 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 100 > 101 <span 102 class="gatsby-resp-image-background-image" 103 style="padding-bottom: 56.79903730445246%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAgABBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAe2hoZR//8QAGBABAQEBAQAAAAAAAAAAAAAAAAERAhL/2gAIAQEAAQUCkeYvLWq//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFhABAQEAAAAAAAAAAAAAAAAAADEg/9oACAEBAAY/AkTH/8QAGxAAAgIDAQAAAAAAAAAAAAAAAAERITFRYaH/2gAIAQEAAT8hQ1a8OAVOBIlsaz//2gAMAwEAAgADAAAAEKMP/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQMBAT8QV//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EABwQAAICAgMAAAAAAAAAAAAAAAABESFBoVHw8f/aAAgBAQABPxBI2jzSPhtcCWlejuQ6
103F4P/2Q=='); background-size: cover; display: block;" 104 > 105 <img 106 class="gatsby-resp-image-image" 107 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 108 alt="Microsoft Silverlight page with an installation button" 109 title="" 110 src="/static/silverlight-b8600e7fe201dbc24998a9aacecd3684-f8fb9.jpg" 111 srcset="/static/silverlight-b8600e7fe201dbc24998a9aacecd3684-e8976.jpg 148w, 112/static/silverlight-b8600e7fe201dbc24998a9aacecd3684-63df2.jpg 295w, 113/static/silverlight-b8600e7fe201dbc24998a9aacecd3684-f8fb9.jpg 590w, 114/static/silverlight-b8600e7fe201dbc24998a9aacecd3684-da6d6.jpg 831w" 115 sizes="(max-width: 590px) 100vw, 590px" 116 /> 117 </span> 118 </span> 119 120 </a> 121 </p> 122<p>In the meantime, Google was working on <a href="https://en.wikipedia.org/wiki/Google_Native_Client">its own thing for 123Chrome</a>:</p> 124<p> 125 <a 126 class="gatsby-resp-image-link" 127 href="/static/chrome_nacl-14dd7527a35d3d99235e94e99ca4ae06-5d9c9.png" 128 style="display: block" 129 target="_blank" 130 rel="noopener" 131 > 132 133 <span 134 class="gatsby-resp-image-wrapper" 135 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 136 > 137 <span 138 class="gatsby-resp-image-background-image" 139 style="padding-bottom: 40.46153846153846%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsSAAALEgHS3X78AAABuElEQVQoz43R3UvTURjA8R9lF5b0p3QhClJXSVSC9Ia78MarbiIIIQgKiiiQEnq5yIYFpaalZZuGFDmQJmJz2iyLomj7DdJmsJff27bfy9nv29mKvKnwOXw4cJ7Dw3Oeo2x5EGB36AwHw+dpm7hA+7OLf+x9epaWx6dpGu2mWWr6rXmsm8ahkzTePs6uR6fovNzJuRNtbO9pRVHuH2XkbQQrWyCzvo5VLGIWLcqlEtHPy9xanOR6IsyNxIQU3vBGWgpxTe5980/oedFPQ+9+lK0Dx3j+bo7Mtx+k1DS6pmHoBoV8nrW1VXLZHJ7j4pZtydlg/+LIc0sziazE2NF7AKV+uINgJMLgeJzx6QSmqVPQdFxPUA3f9xEVIVX+QuAKr3Yv+iFO/ZV9KA0jAa6GJgkOzRJ8OENaTaKqKo7jsJnw5arGy6UoO/sCKNvuHWFqJc58LMnHrxmEzNsuWCVPztKTM/23at4oupiaz9TCHHumL6HU3T3MzJdFVlMpkqm0vCTn4vo1tlOhbIv/KtmyuF7tMEbX8h1ZsL+d2eQn8t9lZ3L4hqHVPiSXyyKE2PSTX71f4NDrm/wEhcQfOX7faHIAAAAASUVORK5CYII='); background-size: cover; display: block;" 140 > 141 <img 142 class="gatsby-resp-image-image" 143 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 144 alt="Google Native Client plug-in settings in the Chrome browser" 145 title="" 146 src="/static/chrome_nacl-14dd7527a35d3d99235e94e99ca4ae06-fb8a0.png" 147 srcset="/static/chrome_nacl-14dd7527a35d3d99235e94e99ca4ae06-1a291.png 148w, 148/static/chrome_nacl-14dd7527a35d3d99235e94e99ca4ae06-2bc4a.png 295w, 149/static/chrome_nacl-14dd7527a35d3d99235e94e99ca4ae06-fb8a0.png 590w, 150/static/chrome_nacl-14dd7527a35d3d99235e94e99ca4ae06-5d9c9.png 650w" 151 sizes="(max-width: 590px) 100vw, 590px" 152 /> 153 </span> 154 </span> 155 156 </a> 157 </p> 158<p>It would be fair to say that these attempts failed to establish wide adoption, especially 159after both consumers and businesses started shifting to mobile. Hereâs how all these forays ended 160according to Wikipedia:</p> 161<blockquote> 162<p>Microsoft dropped ActiveX support from the Windows Store edition of Internet Explorer 10 in 163Windows 8. In 2015 Microsoft released Microsoft Edge, the replacement for Internet Explorer with 164no support for ActiveX, this marked the end of the technology in Microsoftâs web browser 165development.</p> 166</blockquote> 167<p><small><a href="https://en.wikipedia.org/w/index.php?title=ActiveX&oldid=969259090#Platform_support">âActiveXâ</a> 168article on Wikipedia.</small></p> 169<blockquote> 170<p>Beginning in 2013, major web browsers began to phase out support for the underlying technology 171applets used to run, with applets becoming completely unable to be run by 2015â2017. Java applets 172were deprecated since Java 9 in 2017 and removed from Java SE 11 (18.9), released in September 1732018.</p> 174</blockquote> 175<p><small><a href="https://en.wikipedia.org/w/index.php?title=Java_applet&oldid=972322018">âJava appletâ</a> 176article on Wikipedia.</small></p> 177<blockquote> 178<p>In July 2017, Adobe announced that it would declare Flash to be end-of-life at the end of 2020, 179and will cease support, distribution, and security updates for Flash Player.</p> 180</blockquote> 181<p><small><a href="https://en.wikipedia.org/wiki/Adobe_Flash#End_of_life">âAdobe Flashâ</a> article on 182Wikipedia.</small></p> 183<blockquote> 184<p>There is no Silverlight plugin available for Microsoft Edge. It has not been supported by Google 185Chrome since September 2015 or by Firefox since March 2017.</p> 186</blockquote> 187<p><small><a href="https://en.wikipedia.org/wiki/Microsoft_Silverlight#Demise">âMicrosoft Silverlightâ</a> 188article on Wikipedia.</small></p> 189<blockquote> 190<p>On October 12, 2016, a comment on the Chromium issue tracker indicated that Googleâs Pepper and 191Native Client teams had been destaffed.</p> 192</blockquote> 193<p><small><a href="https://en.wikipedia.org/w/index.php?title=Google_Native_Client&oldid=973604804">âGoogle Native 194Clientâ</a> article on 195Wikipedia.</small></p> 196<h2>But JavaScript solved all these problems, didnât it?</h2> 197<p>Most of these browser add-ons were introduced before modern JavaScript and HTML5 became available, 198so one could argue you no longer need browser add-ons at all. Well, <a href="https://daringfireball.net/linked/2017/06/27/web-without-javascript">some 199purists</a> even say browsers 200should have never supported JavaScript or any scripting whatsoever in the first place. Nevertheless, 201there are enough use cases for browser scripting and browser apps in general that are hard to avoid. 202When looking at the history of browser plugins in general, itâs hard not to notice a few themes:</p> 203<ul> 204<li>Distributing productivity apps via browsers is convenient in a lot of cases.</li> 205<li>Browser gaming made a lot of sense, especially for casual games.</li> 206<li>In both of these scenarios browsers had to display something more complex than text and a few 207static images.</li> 208</ul> 209<p> 210 <a 211 class="gatsby-resp-image-link" 212 href="/static/flashelementtd-d00aec3e17cce46cb27a2b1662672bcf-d5c50.jpg" 213 style="display: block" 214 target="_blank" 215 rel="noopener" 216 > 217 218 <span 219 class="gatsby-resp-image-wrapper" 220 style="position: relative; display: block; ; max-width: 288px; margin-left: auto; margin-right: auto;" 221 > 222 <span 223 class="gatsby-resp-image-background-image" 224 style="padding-bottom: 105.90277777777777%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAVABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAEDBP/EABcBAQEBAQAAAAAAAAAAAAAAAAABAgP/2gAMAwEAAhADEAAAAeQvLNQm4qg//8QAGxAAAQQDAAAAAAAAAAAAAAAAAAEQERMSMUH/2gAIAQEAAQUCkTRDcrMCs//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABYRAAMAAAAAAAAAAAAAAAAAAAAQEf/aAAgBAgEBPwFw/8QAGBABAAMBAAAAAAAAAAAAAAAAAAEQQTH/2gAIAQEABj8CqGMRfX//xAAdEAADAQABBQAAAAAAAAAAAAAAAREhMVFhgbHh/9oACAEBAAE/IVlLEW8Rw5TSYJsdTyJSu8Op6CIq052JNfB//9oADAMBAAIAAwAAABBTwIL/xAAYEQADAQEAAAAAAAAAAAAAAAAAATERIf/aAAgBAwEBPxBvo6aU/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAEREP/aAAgBAgEBPxB5EQf/xAAdEAEBAAICAwEAAAAAAAAAAAABEQAhMUFR0fGB/9oACAEBAAE/EFCCRLOf3EjSS75M6QnaEyIOwUjm/NZADdmG+f6cABAS17zxIdyPvNBAAQPrP//Z'); background-size: cover; display: block;" 225 > 226 <img 227 class="gatsby-resp-image-image" 228 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;"
229 alt="Flash Element TD game screenshot with a classic tower defense battle field" 230 title="" 231 src="/static/flashelementtd-d00aec3e17cce46cb27a2b1662672bcf-d5c50.jpg" 232 srcset="/static/flashelementtd-d00aec3e17cce46cb27a2b1662672bcf-399a3.jpg 148w, 233/static/flashelementtd-d00aec3e17cce46cb27a2b1662672bcf-d5c50.jpg 288w" 234 sizes="(max-width: 288px) 100vw, 288px" 235 /> 236 </span> 237 </span> 238 239 </a> 240 </p> 241<p><small>The modern casual <a href="https://en.wikipedia.org/wiki/Tower_defense">tower defense game genre</a> 242arguably was reborn due to the popularity of Adobe Flash and browser gaming, with <a href="https://en.wikipedia.org/wiki/Flash_Element_TD">Flash Element 243TD</a> being a classic example.</small></p> 244<p>Even though native apps were (and in many situations still are) objectively better for users, early 245browser apps were attempting to build their own ad-hoc app stores before the App Store existed. 246You didnât have to buy a CD with an application and install it and manage it on your disk. You 247didnât have to install updates manually and migrate your data. There was no need to uninstall apps, 248you just close a corresponding browser tab and forget about it.</p> 249<p>And when browser scripting capabilities became advanced enough, some people started seeing the 250allure of making a browser version of their app the only version they provided. Browsers are 251cross-platform, arenât they? Just wrap your JavaScript app code in a browser-like container (say 252<a href="https://en.wikipedia.org/wiki/Electron_(software_framework)">Electron</a>) and distribute that instead 253of your native app. </p> 254<p>But eventually not only the JavaScript APIs became more complex, the language itself could no longer 255accommodate what developers wanted. Not everyone liked JavaScript syntax (remember 256<a href="https://en.wikipedia.org/wiki/CoffeeScript">CoffeeScript</a>?) or semantics (I couldnât help but 257notice that <a href="https://en.wikipedia.org/wiki/TypeScript">TypeScript</a> has grown in popularity in recent 258years). But itâs hard to transpile an arbitrary programming language to JavaScript, the latter was 259not built with that goal in mind.</p> 260<p>Corollary, the JavaScript interpreter itself has both memory and performance overhead. Having a 261garbage collector built in makes it even harder to transpile languages with different memory models 262to JavaScript. The allure of having only one language to write all your apps for all platforms is 263still there, but why do you have to be confined to JavaScript itself, even as a target language?</p> 264<h2>How WebAssembly actually started</h2> 265<p>With the death of browser plugins, at least we can praise the interoperability efforts of browser 266vendors. Some lowest common denominator of JavaScript is supported in all browsers, and there is a 267clear incentive for the vendors to keep up. With the demand to go beyond JavaScript, there were 268initial attempts to support low level programming with asm.js in 2013:</p> 269<blockquote> 270<p>Much of this performance gain over normal JavaScript [with asm.js was] due to 100% type consistency 271and virtually no garbage collection (memory is manually managed in a large typed array).</p> 272</blockquote> 273<p><small><a href="https://en.wikipedia.org/wiki/Asm.js">âasm.jsâ</a> article on Wikipedia.</small></p> 274<p>Syntactically this still looked pretty much like JavaScript, but when you have a lot of low level code, 275the resulting file can get big pretty quickly, and the size of your code is pretty important when your 276users download it frequently. As you werenât supposed to write asm.js code manually most of the time, 277and it was designed primarily as compilation target, it made sense to invent a binary format for it. 278Thatâs basically how WebAssembly started:</p> 279<blockquote> 280<p>WebAssembly was first announced in 2015, and the first demonstration was executing Unityâs Angry 281Bots in Firefox, Google Chrome, and Microsoft Edge. The precursor technologies were asm.js from 282Mozilla and Google Native Client, and the initial implementation was based on the feature set of 283asm.js.</p> 284</blockquote> 285<p><small><a href="https://en.wikipedia.org/wiki/WebAssembly#History">âWebAssemblyâ</a> article on 286Wikipedia.</small></p> 287<p> 288 <a 289 class="gatsby-resp-image-link"
290 href="/static/angrybots-af143aa014afd3462b9ef4d25875af9f-5b672.png" 291 style="display: block" 292 target="_blank" 293 rel="noopener" 294 > 295 296 <span 297 class="gatsby-resp-image-wrapper" 298 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 299 > 300 <span 301 class="gatsby-resp-image-background-image" 302 style="padding-bottom: 61.39462407479548%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAADX0lEQVQozx2TW0ybdRiHv8gxWxk1pVA22tIDPdAWaPm+nugpWymFtlBOG4eJDCZ0ymCjcxhNZINJZOoW4iaRbGyLWRxx0+hmdFETY7LEm7ldYIwXikYvTDTRqFe78PEbF7/kvXryvr/n/xekKhW6nQosZQqkKjWSUkFbnZ5j/V2kg24unB7k3HQ3CZuOsFbF0L5m9jr0LGTMnGy14iotQCorIqTexTOtLQjTrRLtThNGQSBQXsaoQ0lEXUp/1EeHDByK2cn3RAnWViM+uYusz83T7QE2lofptqkwlpRQu6OMtE7Fy30xhMUWA0ujbdQ+UcyIVcHvn47zxlwXCYsB0a7n/MUcP357kwcPPuby6/O4d1cTtJg4/9IYXl0lNVV2Gi0hAk0BrA4JYT2io9eiJ6xU0VlfxUfrp7h97RxLQ16WprKsrMxy95NVfvrlKzYf3uDqygnSDQ0kak1oikvRlu7AUFiMt1KDWalG2NyQN7g9wNeXDzEu2fDr9Gz9cJ9Hf9xl+bkODrVnGE/FWHvrCOvXF/j3tTzv5SaJSwHamlzkOkQuLBxkdXWO/GQ3wsWZYT4bEfn5i8N8tzFNt1x40u3g3jdfcnJulLG4n1wqKPcWY74rwmJIZNrnY9DZzKg/TD4R5e3lGW7cusSp2TGEXLSRvLmWd6zVzMQbSZmMuFVqbAYTNr2Wic4oPaKB47Z6XnWYGVBXMut08aIoMqE3MlVnZ1qUOBoNccwjypa9NdxZjLCWcOEv2YkoP506rRZBtv44u5XlTBpqmHfYiYtBIi4nSY+HzpYAYauFVHMD6YCP4b4MZ85MINx63stcVjalUpFvNOLUlG+DigsLKS4q2p6l6gqm+pP0RMNkwjE6JT/7jCYyMnxlJMT1qRDvzoTZur+E0O/U4VYoOZ0N8PlUJ9eSHoSCAgrlPIaVyKmv0hCrMzOeCJL2uGl1NJBpdLEmS9g8G+a3NzU82vTy9/c9CIMy8MqzCX69+QIPPzzL1uIRZvzWbZjLYuaV47PMHxwgKZ/XIm/1VChARO631+3kztEof13dy58f7OGf91X8d69JltIXpy8VIdEW4UA2zoFUkrRNT5H8A0J+H/t7e/C7m3DKgjSqClmWEW2FGod+D2FLNX2+Gg7vt3Ii62Y018X/U2jFkcjhK0cAAAAASUVORK5CYII='); background-size: cover; display: block;" 303 > 304 <img 305 class="gatsby-resp-image-image" 306 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 307 alt="Angry Bots is a 3rd-person shooter demo that features a marine-like character that walks 308through some futuristic research base and defends from suicidal four-legged robots" 309 title="" 310 src="/static/angrybots-af143aa014afd3462b9ef4d25875af9f-fb8a0.png" 311 srcset="/static/angrybots-af143aa014afd3462b9ef4d25875af9f-1a291.png 148w, 312/static/angrybots-af143aa014afd3462b9ef4d25875af9f-2bc4a.png 295w, 313/static/angrybots-af143aa014afd3462b9ef4d25875af9f-fb8a0.png 590w, 314/static/angrybots-af143aa014afd3462b9ef4d25875af9f-526de.png 885w, 315/static/angrybots-af143aa014afd3462b9ef4d25875af9f-fa2eb.png 1180w, 316/static/angrybots-af143aa014afd3462b9ef4d25875af9f-08f6a.png 1770w, 317/static/angrybots-af143aa014afd3462b9ef4d25875af9f-5b672.png 2567w" 318 sizes="(max-width: 590px) 100vw, 590px" 319 /> 320 </span> 321 </span> 322 323 </a> 324 </p> 325<p><small>Angry Bots is still available to play on the <a href="https://beta.unity3d.com/jonas/AngryBots/">Unity 326website</a>.</small></p> 327<h2>What WebAssembly got right</h2> 328<p>Now youâre no longer restricted to JavaScript as a target language for browser apps. As soon as 329<a href="https://llvm.org/">LLVM</a> got WebAssembly backend more or less ready, it allowed compilers built 330on top of LLVM (for C, C++, Rust, Swift and many more) to adopt it without rewriting everything from 331scratch. This unlocked the browser environment to a huge amount of pre-existing software that can 332also run close to native speed if optimized well.</p> 333<p>Not only can you run fun little projects such as <a href="https://sandspiel.club/">Sandspiel</a> and 334<a href="https://orb.farm/">orb.farm</a> in your browser tab, but complex games such as <a href="https://www.continuation-labs.com/projects/d3wasm/">Doom 3353</a> (at least its demo version) are available too. 336Both <a href="https://blogs.unity3d.com/2018/08/15/webassembly-is-here/">Unity</a> and <a href="https://twitter.com/unrealengine/status/932624595722559490">Unreal 337Engine</a> announced their support for 338WebAssembly, and while we may not see AAA games running in browsers on their initial release date, 339this still gives enough confidence in the maturity of the platform.</p> 340<p> 341 <a 342 class="gatsby-resp-image-link" 343 href="/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-9c30a.png" 344 style="display: block" 345 target="_blank" 346 rel="noopener" 347 > 348 349 <span 350 class="gatsby-resp-image-wrapper" 351 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 352 > 353 <span 354 class="gatsby-resp-image-background-image" 355 style="padding-bottom: 59.14209115281501%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAAC+ElEQVQozyWTW08bVxRG/QIBkjYQY+PLMDa+G98yvo3HHoxnPBePPXYAAzGOG6CIqg8taZo/UFXqc6X8gEpRo/Znrp7Cw5L2y1lnn7P3FziQ9sgkouRTEoX0PsX/yexTFjTLKbRahp6So18vMGjkMJp5jmopOuUDhu0yn//4k78+f+Hfv7/y9Z8vBLLJqBDFKeVkqoUkteIBjVKK7rGGZnh09D5t3UTrW/Ttcyz/HbOzG2aGyqRX4u7C44e5K7C4O58QKGViVHISrwsy9WKCVjFJ11RQfJeWfYLqnNF1z+hPr7CXv2LNv8eZ37J4e8m11+TiuMwbLY9Vkz
355k+jBJIRV6Sjm6Tje+Qi+2gFCUqrkptYNA6dmkcmTR1C3U0RV0uMNwJpuNhTE64HGks9CxzLcupmnokkAptkAlvkYs+Jy/qWv2A0qBDvevQtq5oDMfo5pie7dC/XDLyDZzRENN1mfkdrtpRFq0IKzXCbS8unhxepxp5hhLfQJWe0Ra3KUcdWi0dc37J7O4C03QZDo4xlid4c4e5M+DU05nP6vxuvuS3o01+Ubd4aG8RSO+skQ2uie7WqQj561aWstahUtfx3AGruXhy9wjTMjg9txjYJiPLwZucMnGb/Kx+y4/KBqvKJlflTQLx7XWkVxvIu5vI22uUKlmK2lBIPZo9B6VjU+kOGV/PeP9xhtI36Ngjupd3OGMb5/AVVjHIqBTEr4YIxILPie++QAp9gyTqYkaipo/JawYlcbCkCaFm0vA8VG9M1/CpWj7q4hzf7jGsxDDKkphw7JFASgqRkcPkEnvkkhEKyT30hoI7vqI2fUe1NxSCKY3BlKYtOnSWnK0WPNwO8XtlXPFFViONfiih5sTayNEgSSFNy0+JeVz01D6nww733zm8vfE5u35Px//A6I3Lp3uLjysdu50XaXlKjHqYEMi08mLK8fAO+5EgiViIAyn8xP4ecnwXTy/y6c7h4d7hw/WYn25c7k+aVLMy5bSEkhdhEDQKCYH8yH+4Oox9bVwTwgAAAABJRU5ErkJggg=='); background-size: cover; display: block;" 356 > 357 <img 358 class="gatsby-resp-image-image" 359 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 360 alt="A pixel-art spherical fish tank filled with water, sand, algae, daphnia and fish." 361 title="" 362 src="/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-fb8a0.png" 363 srcset="/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-1a291.png 148w, 364/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-2bc4a.png 295w, 365/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-fb8a0.png 590w, 366/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-526de.png 885w, 367/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-fa2eb.png 1180w, 368/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-08f6a.png 1770w, 369/static/orbfarm-d5127e6241542d4c77ee0faf5d5e8d41-9c30a.png 3730w" 370 sizes="(max-width: 590px) 100vw, 590px" 371 /> 372 </span> 373 </span> 374 375 </a> 376 </p> 377<p><small>According to its creator, <a href="https://orb.farm">orb.farm</a> is âa virtual ecosystem where different 378species of creature can live, grow and die as part of a self-contained food chainâ.</small></p> 379<p>Itâs obviously not limited to games, as we can see Apple folks compiling their <a href="https://twitter.com/lrz/status/1250453967957561344">C++ and Objective-C 380code from iWork</a> to Wasm<sup id="fnref-1"><a href="#fn-1" class="footnote-ref">1</a></sup>, or 381<a href="https://1password.com/">1Password</a> using it in their browser extension getting substantial 382performance improvements as a result:</p> 383<blockquote> 384<p>With our move to WebAssembly, page filling and analysis now runs at least twice as fast as before, 385and those websites with a large number of fields are up to 13x faster in Chrome and up to 39x 386faster in Firefox! Itâs blazing fast. ð¥</p> 387</blockquote> 388<p><small><a href="https://blog.1password.com/1password-x-may-2019-update/">â1Password X: May 2019 updateâ</a> 389article on <a href="https://blog.1password.com/">the 1Password blog</a>.</small></p> 390<h2>Wasm is a general purpose virtual machine</h2> 391<p>Not only you get performance improvements with WebAssembly compared to JavaScript, as it was 392designed to run arbitrary code in your browser, itâs one of the most widely available secure sandbox 393environments. And as a general purpose virtual machine, Wasm is not limited only to browsers. 394<a href="https://www.cloudflare.com/">Cloudflare</a> uses it for edge computing on their CDN:</p> 395<blockquote> 396<p>Weâre excited by the possibilities that WebAssembly opens up. Perhaps, by integrating with 397Cloudflare Spectrum, we could allow existing C/C++ server code to handle arbitrary TCP and UDP 398protocols on the edge, like a sort of massively-distributed inetd. Perhaps game servers could 399reduce latency by running on Cloudflare, as close to the player as possible. Maybe, with the help 400of some GPUs and OpenGL bindings, you could do 3D rendering and real-time streaming directly from 401the edge.</p> 402</blockquote> 403<p><small><a href="https://blog.cloudflare.com/webassembly-on-cloudflare-workers/">âWebAssembly on Cloudflare 404Workersâ</a> on <a href="https://blog.cloudflare.com/">the Cloudflare 405blog</a>.</small></p> 406<p>With people realizing the wide applicability of the Wasm tech stack, it was no surprise when 407<a href="https://wasi.dev/">WASI</a> (stands for WebAssembly System Interface) appeared. Where WebAssembly 408itself is a âbare metalâ platform, it does not supply any primitives such as memory allocation or 409filesystem access, which WASI does provide. As Solomon Hykes, creator of Docker, <a href="https://twitter.com/solomonstre/status/1111004913222324225">puts 410it</a>:</p> 411<blockquote> 412<p>
412If WASM+WASI existed in 2008, we wouldnât have needed to created Docker. Thatâs how important it 413is. Webassembly on the server is the future of computing. A standardized system interface was the 414missing link. Letâs hope WASI is up to the task!</p> 415</blockquote> 416<p><small><a href="https://twitter.com/solomonstre/">@solomonstre</a> on <a href="https://twitter.com/solomonstre/status/1111004913222324225">27 March 4172019</a>.</small></p> 418<p>Many of you may know that shipping compilers or virtual machines <a href="https://stackoverflow.com/questions/5054732/is-it-prohibited-using-of-jitjust-in-time-compiled-code-in-ios-app-for-appstor">through the iOS App 419Store</a> 420is prohibited. With Wasm you get the ultimate JIT compiler and virtual machine installed on any 421relatively recent iOS device. Unsurprisingly enough, people have been able to ship <a href="https://twitter.com/Textastic/status/1254664742960054277">a C++ compiler 422and a command line shell</a> in an app 423approved for App Store, so letâs hope this remains a legit way to distribute developer tools on iOS. 424ð¤</p> 425<p> 426 <a 427 class="gatsby-resp-image-link" 428 href="/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-26be2.jpg" 429 style="display: block" 430 target="_blank" 431 rel="noopener" 432 > 433 434 <span 435 class="gatsby-resp-image-wrapper" 436 style="position: relative; display: block; ; max-width: 590px; margin-left: auto; margin-right: auto;" 437 > 438 <span 439 class="gatsby-resp-image-background-image" 440 style="padding-bottom: 74.96339677891655%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAPABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAUDBAb/xAAUAQEAAAAAAAAAAAAAAAAAAAAC/9oADAMBAAIQAxAAAAGddfWo6wAr/8QAGhAAAgIDAAAAAAAAAAAAAAAAAgQAAwEiNP/aAAgBAQABBQJ3StcizfHjEq1+if/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABURAQEAAAAAAAAAAAAAAAAAABAh/9oACAECAQE/Aaf/xAAdEAAABQUAAAAAAAAAAAAAAAAAAhAhQQEDERJx/9oACAEBAAY/Ai6s4I8oXFZFvqf/xAAZEAADAQEBAAAAAAAAAAAAAAAAARFhQXH/2gAIAQEAAT8hWyGfKwSbaCC0t5wWFp//2gAMAwEAAgADAAAAENAP/8QAFhEBAQEAAAAAAAAAAAAAAAAAAREQ/9oACAEDAQE/EILTP//EABYRAQEBAAAAAAAAAAAAAAAAAAEREP/aAAgBAgEBPxCgjn//xAAbEAEBAQACAwAAAAAAAAAAAAABEQAhUUGBsf/aAAgBAQABPxAw0ApFKzlyNPTo6NR0KSjy7zUE4fHR3v/Z'); background-size: cover; display: block;" 441 > 442 <img 443 class="gatsby-resp-image-image" 444 style="width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;" 445 alt="a-Shell and Textastic running side-by-side demoing a "Hello, World!" app written in C++ compiled 446to WebAssembly and running on iOS" 447 title="" 448 src="/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-f8fb9.jpg" 449 srcset="/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-e8976.jpg 148w, 450/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-63df2.jpg 295w, 451/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-f8fb9.jpg 590w, 452/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-85e3d.jpg 885w, 453/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-d1924.jpg 1180w, 454/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-9452e.jpg 1770w, 455/static/ashell-59e3d6e03005d1c31bcccc66f65bc87b-26be2.jpg 2732w" 456 sizes="(max-width: 590px) 100vw, 590px" 457 /> 458 </span> 459 </span> 460 461 </a> 462 </p> 463<p><small><a href="https://apps.apple.com/us/app/a-shell/id1473805438">a-Shell</a> and 464<a href="https://apps.apple.com/us/app/id1049254261?mt=8">Textastic</a> are available on the iOS App 465Store.</small></p> 466<p>And what completely blew my mind recently is a JIT compiler for x86 binary code running in 467browsers (not all browsers yet, it requires some features that are currently only supported in Chrome):</p> 468<blockquote> 469<p>As part of CheerpX, we have implemented a fast x86 interpreter and JIT compiler that can generate 470WebAssembly modules on the fly to efficiently execute arbitrary x86 applications and libraries, 471fully client-side.</p> 472</blockquote> 473<p><small><a href="https://medium.com/leaningtech/extreme-webassembly-1-pushing-browsers-to-their-absolute-limits-56a393435323">âExtreme WebAssembly 1: pushing browsers to their absolute 474limitsâ</a> 475on <a href="https://medium.com/leaningtech">Leaning Technologiesâ Blog</a>.</small></p> 476<h2>WebAssembly as a platform</h2> 477<p>As a secure and fast sandbox, Wasm also seems to be a good fit for application plugins. One could 478imagine editors such as <a href="https://code.visualstudio.com/">VSCode</a> or <a href="https://atom.io/">Atom</a> allowing 479extensions to be written not only in JavaScript, but in any language that can target WebAssembly. 480This would make their extensions ecosystem richer and unlock performance improvements that this 481platform provides. Miguel de Icaza, the creator 482of <a href="https://www.mono-project.com/">Mono</a> and <a href="https://dotnet.microsoft.com/apps/xamarin">Xamarin</a>
483agrees, and goes further with this idea:</p> 484<blockquote> 485<p>[â¦] IDEs/Editors/Tools could leverage WebAssembly to host their favorite language for scripting 486during the development stage, but for the final build of a product (like Unity, Godot, Rhino3D, 487Unreal Engine and really any other application that offers scripting capabilities) they could 488bundle the native code without having to take a WebAssembly dependency.</p> 489</blockquote> 490<p><small><a href="https://tirania.org/blog/archive/2020/Mar-02.html">âScripting Applications with 491WebAssemblyâ</a> on <a href="https://tirania.org/blog/">Miguel de Icazaâs 492Blog</a>.</small></p> 493<p>WebAssembly is arguably a more direct path towards achieving the idealistic goal of âwrite once, run 494anywhereâ than Java/JVM ever was. This is thanks to the open nature of the whole stack, potential 495developer mind share (spanning big and diverse set of languages and ecosystems), and direct 496involvement of browser vendors such as Apple, Google, Mozilla and Microsoft. This is the opposite to 497the fractured ecosystem we saw in the 90s and 00s, where every vendor had their own 498special plugin and forced you to use a specific programming language as a gatekeeping measure.</p> 499<h2>What WebAssembly still needs</h2> 500<p>As with any tech stack in its early years, not everything is hunky-dory in the WebAssembly land. It 501would be unfair if I didnât mention that <a href="https://thenewstack.io/the-pain-of-debugging-webassembly/">debugging with <code>print</code> 502statements</a> is still a thing when 503targeting Wasm, or that <a href="https://github.com/WebAssembly/threads/">multi-threading support</a> is not 504available in all browsers and formally havenât reached the implementation stage yet. The lack of 505<a href="https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md">stable ABI for dynamic 506linking</a> is not 507critical and static linking makes some things somewhat easier, but it can still bite at times.</p> 508<p>The fact that the vast majority of consumer computing devices (92% as of September 2020 according to 509<a href="https://caniuse.com/#search=webassembly">caniuse.com</a>) have a universal virtual machine that can be 510targeted by virtually any programming language is still fascinating to me. What WebAssembly 511definitely needs is more attention from developers, and if all goes well, in a few years weâll see 512even more products that werenât possible before.</p> 513<div class="footnotes"> 514<hr> 515<ol> 516<li id="fn-1"> 517<p>Wasm is an abbreviation, but not an acronym, and it is the capitalization that <a href="https://webassembly.org/">WebAssembly spec authors use</a> (in addition to the all-lowercase âwasmâ). Thus, we should follow the authors with this capitalization variant, unless youâre one of those, who writes âIOSâ, âXCodeâ or âIPhoneâ. ð</p> 518<a href="#fnref-1" class="footnote-backref">â©</a> 519</li> 520</ol> 521</div></div><div data-reactid="33"><hr style="margin-bottom:1.75rem;" data-reactid="34"/><p data-reactid="35"><!-- react-text: 36 -->If you enjoyed this article, please consider <!-- /react-text --><a href="/sponsor" data-reactid="37">becoming a sponsor</a><!-- react-text: 38 -->. My goal is to produce content like this and to work on open-source projects full time, every single contribution brings me closer to it! This also benefits you as a reader and as a user of<!-- /react-text --><!-- react-text: 39 --> <!-- /react-text --><a href="https://github.com/MaxDesiatov" data-reactid="40">my open-source projects</a><!-- react-text: 41 -->, ensuring that my blog and projects are constantly maintained and improved.<!-- /react-text --></p></div><hr style="margin-bottom:1.75rem;" data-reactid="42"/><ul style="display:flex;flex-wrap:wrap;justify-content:space-between;list-style:none;padding:0;" data-reactid="43"><li data-reactid="44"><a rel="prev" href="/swift-reference-cycles/" data-reactid="45"><!-- react-text: 46 -->â <!-- /react-text --><!-- react-text: 47 -->Unbreakable reference cycles in Swift no one is talking about<!-- /react-text --></a></li><li data-reactid="48"><a rel="next" href="/swift-webassembly-2020/" data-reactid="49"><!-- react-text: 50 -->The state of Swift for WebAssembly in 2020 (and earlier)<!-- /react-text --><!-- react-text: 51 --> â<!-- /react-text --></a></li></ul><footer style="margin-top:4.375rem;" data-reactid="52"><small data-reactid="53"><center data-reactid="54"><p data-reactid="55"><!-- react-text: 56 -->Powered by <!-- /react-text --><a href="https://gatsbyjs.org" data-reactid="57">Gatsby.</a></p><p data-reactid="58">© 2018-2021 Max Desiatov</p></center></small></footer></div></div></div>
521<script id="webpack-manifest">/*<![CDATA[*/window.webpackManifest={"231608221292675":"app-6b321113b6b3d492c203.js","107818501498521":"component---src-templates-blog-post-js-b7034c2908d4eabf5b27.js","139266963665775":"component---src-templates-index-page-js-af0c91319ff63f7846be.js","162898551421021":"component---src-pages-404-js-4503918ea3a16cfcdb75.js","35783957827783":"component---src-pages-index-js-f52c4a816ca1b0dd65ce.js","60335399758886":"path----557518bd178906f8d58a.js","184653025083338":"path---swift-structured-concurrency-introduction-d99330a6b9a97f6c4532.js","201774980081568":"path---swift-webassembly-2020-744fff401ddc3db425be.js","168045172811202":"path---why-webassembly-68fe783956f80376d169.js","256332985143643":"path---swift-reference-cycles-6c3b1c375b7625dab932.js","41125810219843":"path---swift-codable-xlsx-7252abe1296989a9c21b.js","152795730445263":"path---event-loops-80a157578b0a5a4003d2.js","77403031683835":"path---closures-a33011342d74f0ce1d50.js","111282908390042":"path---why-graphql-bf1ba071dbb859f19197.js","2684010817782":"path---page-0-14dde0645ec5034bf04e.js","254022195166212":"path---404-a0e39f21c11f6a62c5ab.js","142629428675168":"path---index-b765466fb5f8610d37f8.js","178698757827068":"path---404-html-a0e39f21c11f6a62c5ab.js","114276838955818":"component---src-layouts-index-js-834a063f3bdab534994d.js"}/*]]>*/</script>
521<script>/*<![CDATA[*/["/commons-29fe1b9a110c51e997ae.js","/app-6b321113b6b3d492c203.js","/path---why-webassembly-68fe783956f80376d169.js","/component---src-templates-blog-post-js-b7034c2908d4eabf5b27.js","/component---src-layouts-index-js-834a063f3bdab534994d.js"].forEach(function(s){document.write('
521<script src="'+s+'" defer></'+'script>')})/*]]>*/</script>
521</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.