WebAssembly Today ✍️ #12
Updates & commentaries on WebAssembly related technologies, including Rust, serverless, cloud, blockchain, and AI. Focus on the server-side.
Editorial: WebAssembly is stepping forward the browser deeply in this week. Developers love WebAssembly because WebAssembly is safe and portable, although we have known that. Developers like to rewrite famous projects in Rust!
Firefox 79 supports WebAssembly threads and reference types
Firefox 79 was released on July 28, 2020. The new Firefox adds support for the following new WebAssembly features.
First off, seven new built-in operations are provided for bulk memory operations. For example, copying and initializing allow WebAssembly to model native functions such as
memmovein a more efficient, performant way.
The reference-types proposal is now supported. It provides a new type,
wasm-bindgendocumentation provides guidance on how to take advantage of
With the return of SharedArrayBuffer objects, we’re now also able to support WebAssembly threads. Thus, it is now possible for WebAssembly Memory objects to be shared across multiple WebAssembly instances running in separate Web Workers. The outcome? Very fast communication between Workers, as well as significant performance gains in web applications.
These new features could also help WebAssembly move forward on the server-side.
Rive, a real-time interactive design tool, based on WebAssembly
One of the most famous examples of WebAssembly in the browser is Figma, a collaborative interface design tool. Now we have a new design tool, Rive, in the browser. According to its blog, the Rive app takes advantage of WebAssembly to create native desktop and web apps. Specifically, The Rive Ream uses WebAssembly and WebGL to render Skia paint commands in the browser. Compared with Figma, River claims better animation performance.
WebAssembly and Motoko on the blockchain-based Internet Computer
Andreas Rossberg, co-creator of WebAssembly and technical lead of the languages team at DFINITY, discusses the advantages of using WebAssembly implementations of different languages to program the decentralized Internet Computer.
Motoko is a brand new programming language developed by the Dfinity team. He explained that Motoko is optimized for the new decentralized computing environment.
WasmBoxC: Simple, Easy, and Fast VM-less Sandboxing
Alon Zakai, the creator of WebAssembly, has a new project again, called WasmBoxC. It evolves from his wasm2c project, which we covered previously.
WasmBoxC is designed to take advantage of WebAseembly’s sanbox environment to execute the untrusted code safely. It works like this.
Compile the unsafe library using a WebAssembly (wasm) compiler. But instead of generating Wasm bytecode, it emits a C file with sandboxed code.
Write some C to interface with the compiled C code. This is necessary because the sandboxed code can’t access outside memory.
Boids in WebAssembly Using Go
This Boids game is written in Go, and then compiled to WebAssembly to run in any modern browser.
Why choose WebAssembly?
Fast, efficient, and portable
Executes at ‘near-native’ speed
Runs in a secure sandbox
A list of command-line tools written in Rust
This article is a list of command-line tools written in Rust that aim to provide modern, often much faster, alternatives to the existing shell commands.
Writing a file system from scratch in Rust
A file system is integral to any operating system. This article teaches you how to write a file system in Rust. It is very useful learning material for students of systems programming.
Benchmark algorithms in R, Python, and C++
C++ compiled to native is much much faster than Python or R for machine learning algorithms. In many machine learning production systems, Python and R are the “glue code” to pull in ecosystem tools while C++ runs the heavyweight computations.
The same is true for Node.js and SSVM (WebAssembly compiled from Rust).
The original donut is written in C. Daniihh rewrote the C Donut in Rust. Very Cool!
Deno now uses SWC (a TS/JS compiler in Rust) for Typescript type stripping
SWC(Speedy Web Compiler) is a TS/JS compiler written in Rust. Deno team now uses SWC in production to do type stripping from TypeScript programs.
Efficient Serverless deployment of PyTorch models on Azure
Running Pytorch ONNX AI models on Azure Serverless. AI as a Service is coming.
Toward cloud-native 5G core
The era of 5G is coming. How should operators introduce 5G core (5GC) from a network infrastructure perspective? This article will give you some inspirations.
AWS Serverless Application Model Supports Step Functions State Machines
The AWS Serverless Application Model (AWS SAM) recently gained support for AWS Step Functions state machines. AWS Step function is a serverless workflow orchestration service that allows us to "sequence AWS Lambda functions and multiple AWS services into business-critical applications".
Building a serverless tokenization solution to mask sensitive data
How to balance the need to generate value from data and to ensure data privacy? This article offers a way to design a secure, reliable, scalable, and cost-optimized tokenization solution.
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. Thanks!
Until then, stay safe, stay healthy! 😷