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).
Showing posts with label WASI. Show all posts
Showing posts with label WASI. Show all posts

Monday, January 27, 2025

The State of WebAssembly - 2024 and 2025

The State of WebAssembly – 2024 and 2025. For the fifth year in a row, I've had the privilege of writing an article on the state of WebAssembly. In this article, I start off by reviewing the WebAssembly developments during 2024 like Safari rounding out browser support for a number of features including Garbage Collection, newly available features like JavaScript String Builtins and Memory64, WASI 0.2 (formerly called Preview 2) being released, Uno Platform performance improvements, Hyperlight being open-sourced, and even a NIST report on how wasm can help improve security. Then I try to predict where I think things will go in 2025.
For the fifth year in a row, I've had the privilege of writing an article on the state of WebAssembly.

In this article, I start off by reviewing the WebAssembly developments during 2024 like Safari rounding out browser support for a number of features including Garbage Collection, newly available features like JavaScript String Builtins and Memory64, WASI 0.2 (formerly called Preview 2) being released, Uno Platform performance improvements, Hyperlight being open-sourced, and even a NIST report on how wasm can help improve security. Then I try to predict where I think things will go in 2025.

Every year we see many WebAssembly-related improvements and 2024 was no exception. It's easy to get caught up waiting on the next amazing feature but the reality is that wasm and WASI are already very capable as we can see from the increased adoption.

The article can be found here: The State of WebAssembly - 2024 and 2025

Tuesday, January 16, 2024

The State of WebAssembly: 2023-2024

The State of WebAssembly – 2023 and 2024. For the fourth year in a row, I've had the privilege of writing an article on the state of WebAssembly. In this article, I start off by reviewing the WebAssembly developments during 2023 around Garbage Collection, Tail Calls, fixed-width SIMD, multiple memories, improvements in .NET, and work happening with the WebAssembly System Interface (WASI) and the Component Model. Then I try to predict where I think things will go in 2024.
For the fourth year in a row, I've had the privilege of writing an article on the state of WebAssembly.

In this article, I start off by reviewing the WebAssembly developments during 2023 around Garbage Collection, Tail Calls, fixed-width SIMD, multiple memories, improvements in .NET, and work happening with the WebAssembly System Interface (WASI) and the Component Model. Then I try to predict where I think things will go in 2024.

A lot happened last year and 2024 is already shaping up to be an exciting year! It feels like WebAssembly's use is about to take off both as normal WebAssembly modules and as WebAssembly components with WASI.

The article can be found here: The State of WebAssembly: 2023-2024

Wednesday, April 14, 2021

From ConFoo to deploying web applications with Docker

The story of how discovering Docker helped me create the demos for my ConFoo 2021 presentation about the WebAssembly System Interface (WASI). Then the continued learning about Windows containers resulting in my latest Uno Platform article about Deploying C# web applications with Docker.
In 2020, ConFoo opened a call for papers for their February 2021 conference. I submitted several proposals and was pleased to find out in January 2021 that one of them had been accepted.

The talk was going to be about the WebAssembly System Interface (WASI). I knew what I wanted to talk about but I wanted a couple demos that were more real-world than the typical 'hello world' style. I had an idea for the applications I wanted to write but, to write them, I needed to compile some C libraries. Unfortunately, I was having some difficulties getting things set up on Windows.

My first thought for a workaround was to set up a Linux virtual machine but I was curious if there was another way. One thought that crossed my mind was, can Docker help here?

Docker

I had seen Docker demonstrated at a couple user group events but I hadn't used it myself so I needed to get up to speed quickly. Thankfully, I found the following YouTube video that not only explained the Docker theory but also walked through several examples that I was able to follow along with: https://www.youtube.com/watch?v=3c-iBn73dDE

After watching the video, I started looking though the images on Docker Hub and discovered that there's a Docker image for the Emscripten SDK. This is useful to me for a couple of reasons:
     
  • I prefer to have Emscripten use the versions of the tools it installed rather than a different version on my machine just in case the changes impact things when compiling a module. Being in a container, all the tools Emscripten needs are in the container with it allowing me to adjust the tools on my machine as needed.
  • I often switch between versions of Emscripten to test different things. Having an image for each version I need makes things a lot easier. Sometimes I've had to uninstall a version of Emscripten before being able to install the next one. Now, I just need to pull and run the image with the version I need.

In the end, I created a Docker image derived from an Emscripten image and was able to build the demos I wanted for my ConFoo talk.

A few days before the ConFoo conference started, I was talking with the Uno Platform team about Docker. I thought Docker might be useful for C# developers for one-click deployment because I saw on Docker Hub that there was an image with IIS (Internet Information Services).

An article about Docker

After the conference was over, I started looking into Docker from a C# perspective. Unfortunately, every time I tried to build a Windows Docker image, I'd get errors. I spent a number of evenings reading about Windows containers and trying different things but kept spinning my wheels.

I learned a lot about Windows containers in the process but I felt a little dumb when I ran across an article that explained my problem. It turns out that you can't create Linux and Windows containers at the same time. You need to switch Docker Desktop to use one or the other and I was trying to create a Windows container while configured for Linux.

Today, I'm pleased to announce that my latest article "Deploying C# Web Applications with Docker" has been published on the Uno Platform's blog. The article walks you through building an image with IIS and .NET Core, publishing it to a private registry, pulling the image, and running the container.

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.