WebAssembly Today ✍️ #19

Updates & commentaries on WebAssembly related technologies, including Rust, serverless, cloud, blockchain, and AI. Focused on the server-side.

Editorial: WebAssembly continues to rise with more languages, more tools, and more use cases.

WebAssembly Today

High performance and safe AI as a Service in Node.js 👩

For 12 million JavaScript developers, AI as a Service means to run TensorFlow models in Node.js. One way to make this happen is to replace Python native modules with Rust and WebAssembly in Node.js. This article teaches you how to implement Face Detection as a web service using Rust, WebAssembly, and TensorFlow.

Emscripten 2.0.4 is released with Bazel support 👏

Emscripten 2.0.4 was released this week. New features:

  • First release with Bazel support.

  • Stop including malloc and free by default. If you need access to them from JS, you must export them manually using -s EXPORTED_FUNCTIONS=['_malloc', ..].

  • Stop running Binaryen optimizations in -O1. This makes -O1 builds a little larger but they compile a lot faster, which makes more sense in a "compromise" build (in between -O0 and higher optimization levels suitable for release builds). 

  • Add ERROR_ON_WASM_CHANGES_AFTER_LINK option that errors if we need to do any work in wasm-emscripten-finalize or wasm-opt after linking. This can verify the link is maximally fast and also does no DWARF rewriting.

Blazor Gets Faster (Even Without AOT) 👍

Blazor recently published anew Release Candidate (RC) for .NET 5. From the performance benchmarks, Blazor WebAssembly in .NET 5 is 2-3x faster than before. That is due to optimizations in the core framework libraries and improvements to the .NET IL interpreter. The Blazor achieved such performance without using AOT optimization.

Python WebAssembly Playground 🐍

Run Python code in the browser with the Python Playground. Your Python code will be compiled to WebAssembly and run inside the browser. This online IDE also supports JavaScript and Go.

Browser-based FFmpeg video transcoder powered by WebAssembly 🌎

Do you remember the project Video-Transcoder we wrote about in the past? The project has recently rebranded as modfy.video. It also reached a stable release. Its new features and improvements since our last story include the following.

  • Much Lower Data Consumption(Max 25 MB)

  • Support video from any format

  • Complete Modular Design with the CLUI

  • Add documentation and API reference.

Adding experimental WebAssembly support to Decaton from Line team 📱

The Line team recently shared their experience with server-side WebAssembly. This idea is to support user supplied Decaton processors. WebAssembly supports multiple languages and allows the user code to run safely.

The first part of this blog post introduced how to integrate WebAssembly runtime into a Java application.The second part of this blog post discussed how to extend WASI APIs and Rust’s standard library to add support for sockets.

The author said, “In terms of WebAssembly applied outside of browsers, I think it has a very promising future.”

What is WebAssembly and what is not? 🤩

Developer Peter Salomonsen explained why he wants WebAssembly to stay focused as a compute engine instead of providing access to the entire system (eg UI) -- WebAssembly's value proposition is security first. He also raised a good point about using WebAssembly on the server side. It allows code reuse between browser and server.

Porting a c++ game engine to the web with emscripten 🤫

Alex Dixon discussed how he ported a game engine to WebAssembly to run WebGL games in browsers.

Low-Level Academy 👩‍🎓‍

The Low-Level academy will teach systems programming course with Rust and WebAssembly. It starts with network programming. You will learn how to work with the UDP and TCP internet protocols.

Web Assembly All The Things 👀

Google's Martina Kraus shares her slides at the WebAssembly Live conference on how to optimize WebAssembly bytecode for size and startup time.

WebAssembly in Action ✍️

The first chart of WebAssembly In Action is now freely available. Check it out to learn what WebAssembly is and how it works.

Rusty news

Rust 2021: Lower the barriers 👂

To grow Rust and increase adoption among mainstream developers, we must lower the barriers to learn and use Rust. This article gives some suggestions.

  1. Install experience is good - could it be better?

  2. Documentation is good - could it be better? More easily discoverable? For example, is the excellent Rust cookbook widely known? Could it be updated with the latest recommendations for error handling? Translated into more languages?

  3. Tutorials and learning materials are good - could they be better? Could there be more video tutorials or tutorials specific to a certain area like embedded programming?

  4. Compiler errors are good - could they be better, like this recent PR shows?

  5. Compile times and IDE experience have improved - could they continue to improve? Could we get a fast debug backend to improve productivity further?

Why not Rust 🦀

The language war between Go and Rust is just warming up. The good news is that WebAssembly is language agnostic!

Dropbox open sources protobuf codegen 🚀

Dropbox open sourced the pb-jelly,a protobuf code generation frame work for Rust. It is currently used in several parts of Dropbox, including Sync Engine, and the Magic Pocket.

Bevy 0.2 released 🌅

Bevy 0.2 is released. We have written about this refreshingly simple data-driven game engine in the previous issues.
New features:

  • Async task system. The CPU usage wins have been huge.

  • Support initial Web platform using WebAssembly.

  • Parallel Queries

  • Rewrite transform system

  • support Joystick/gamepad

  • improve Bevy ECS performance

Rust in Science and ever-changing requirements 🦀

Comparing Rust with Python from ever-changing requirements, including readability, testability, feedback, and toolchain.

Serverless world

Serverless: I’m a big kid now 🦄

This article is informative. We will get a full understanding of serverless from this article. It will tell you

  • the concept of Serverless,

  • how to classify Serverless,

  • the advantage of serverless over virtual machine,

  • the differences between serverless containers and serverless functions,

  • how to scale serverless functions.

Enjoyed reading this newsletter? Please subscribe to make sure that you do not miss a future issue. ❤️

This newsletter is a collaborative effort. Don’t forget to leave comments! Suggest topics or projects you would like to see we cover next week via contact at webassembly dot today. Thanks!

Until then, stay safe, stay healthy! 😷