Adventures of the Retired Guy

Adventures of the Retired Guy

Stuff and nonsense from a retired guy

30 Dec 2018

What's Webassembly good for

As of the end of 2018, at the minimum viable product phase, it seems you can compile a pile of C code into an assembly, then load and run it in a browser, or in Node.js. You can wrap the assembly in the trappings of an import to javascript and invoke it from script. You apparently cannot call out from WebAssembly to the browser DOM but you could use javascript as a thin shim around those APIs and invoke webassembly with the results.

So it's not ready for web app development.

Then there's the Microsoft Blazor project. This apparently lets you write C# code that invokes .NET framework (or Mono) and uses its own UI component framework, though they say they can also access DOM. It is "full stack", but pretty far afield from Javascript, HTML and CSS (though again they say they are based on those things).

It probably needs a closer look. I certainly would not mind concentrating on C# for code and Razor as my templating language, though I might feel a bit constrained.

If not Blazor, then I have to put WebAssembly on hold and focus on TypeScript and frameworks that support it to write the apps I want to do.