WebAssembly in Action

Author of the book "WebAssembly in Action"
Save 40% with the code: ggallantbl
The book's original source code can be downloaded from the Manning website and GitHub. The GitHub repository includes an updated-code branch that has been adjusted to work with the latest version of Emscripten (currently version 3.1.44).

Wednesday, January 27, 2021

The State of WebAssembly - 2020 and 2021

The State of WebAssembly – 2020 and 2021. In this article, I show you the current state of WebAssembly by looking at the big events of 2020 and then try to predict where I think things are going in 2021.
With the start of a new year, it's common to reflect on what happened over the past year and plan for the upcoming year.

In this article, I'll give you a quick overview of what WebAssembly and WASI are. Then I'll look at the state of WebAssembly in 2020 and tell you where I see things going this year.

The article can be found here: The State of WebAssembly - 2020 and 2021

Friday, January 22, 2021

WebAssembly threads arriving on Android devices

WebAssembly threads arrive on Android devices! Chrome for Android (version 88) was released with the SharedArrayBuffer enabled which means you can now use WebAssembly threads on your Android phones and tablets!
This week, Chrome for Android (version 88) was released and will become available on Google Play over the next few weeks. With this release, the SharedArrayBuffer has been re-enabled which means you'll be able to use WebAssembly threads on your Android phones and tablets!


To enable the SharedArrayBuffer, you need to specify the Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Embedder-Policy (COEP) response headers. Because of the COEP response header, if you include resources from another domain that you trust, you'll need to include the crossorigin attribute with those links.

In July, I wrote an article that walks you through returning the response headers, using the crossorigin attribute, and using WebAssembly threads to convert a user-supplied image to greyscale. You can find my article here: https://cggallant.blogspot.com/2020/07/webassembly-threads-in-firefox.html

Although the article talks about Firefox because it was the first browser to require the new response headers, the content of the article applies to Chrome for Android too.

The response headers will be needed for use with Chrome desktop in the near future (version 91). Safari will require them as well so it's a good idea to update your server response headers with these values if you currently use, or plan to use, the SharedArrayBuffer.

Wednesday, January 13, 2021

ConFoo Online 2021

I am very pleased to announce that I'll be speaking at ConFoo Online 2021! To flow with the conference theme, I titled my talk "Joining forces to free WebAssembly from the browser".
I am very pleased to announce that I'll be speaking at ConFoo Online 2021!

As a fan of Star Wars, the organizer decided that this year's conference theme will be "a new hope" because of COVID-19 and the feeling that the world needs hope that things will improve. To flow with this theme, I titled my talk "Joining forces to free WebAssembly from the browser".

In this talk you'll learn about the WebAssembly System Interface proposal (WASI) that defines a standard for using WebAssembly outside the browser in a secure way. You'll see several examples including interacting with a WebAssembly module from your C# code and at the command line.

The conference will be virtual this year and will take place from February 22nd to 26th. You can find the full list of sessions here: https://confoo.ca/en/yul2021/sessions

Hope to see you there.