Using Docker multi-stage builds to produce WebAssembly

Some time ago I decided to start a fun project, the Wheel of WebAssembly, to demonstrate how different programming languages can be compiled to WebAssembly and loaded independently on the same web page. It supports languages like C, AssemblyScript, C#, Java, Kotlin, Go, Rust (I call them wheel parts). Initially, I decided to manually configure the toolchain for each programming language on my machine and then compile them altogether. This worked fine for a while, but with time it became complicated to handle updates for each toolchain. Furthermore, when someone else wanted to play around with the project, they had to go through the same pain of manually configuring their environment. This lead me to start using Docker for building the WebAssembly output for each language. Continue Reading…

How WebAssembly influences existing JavaScript frameworks

WebAssembly is a compiler target for programs on the Web. It allows developers to compile C/C++ or other static-typed languages in a format that can be run in the browser or a Node.js environment without the need to install any 3rd-party plugins. WebAssembly enables developers to reuse code and create highly efficient web applications with near-Native performance. WebAssembly has been supported by all major browsers since October 2017. Continue Reading…

The Wheel of WebAssembly

I have been following the WebAssembly development since its initiation and given talks about it, but I haven’t really blogged anything related to it. In this post I want to share with you an idea I got some time ago about gathering all languages that can be compiled to WebAssembly. You can see the demo or browse the source.

The initial idea around WebAssembly was to allow compilation from C and C++, as there are many libraries (f.x., gaming, VR, codecs) that could be ported to the Web right away. The compilation architecture is designed to be extensible, meaning that other languages could also be compiled to WebAssembly. Indeed, other language creators (and the community behind them) started experimenting with that.

My idea with the Wheel of WebAssembly is to create a demo of each language that can be compiled to WebAssembly. As the WASM format is standardized, in theory I would expect to get “same” WASM files and to be able to load them on the Web the same way. In practice, it is not the case. Continue Reading…

React vs. Angular components – Part 4

This is a series of posts about comparison between components in Angular and React. The idea of these posts is not to judge which one is best, bur rather to show how these two cope with some typical problems and how we, developers, can use them. In the first three parts (Part 1, Part 2, Part 3) I talked about the starting points – how to create a component, how to attach a template to it, how to do data binding. In this fourth part I am going to deep a bit more into the lifecycle of these components. I will discuss what opportunities and points of extensibility one can find in Angular and React and how one can benefit from them. Continue Reading…

React vs. Angular components – Part 3

This is the next post from the series about comparison between Angular and React. In the first two posts (part 1 and part 2) we saw the differences between Angular and React components in terms of creation, rendering, and configuration. In this post I will discuss the differences in terms of templates. We have already seen some examples for Angular and React components, but in this post I aim to give you some more details about what we can do with these. Continue Reading…