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 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.
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.
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.
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.
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
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.
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.
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!
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.
Running Pytorch ONNX AI models on Azure Serverless. AI as a Service is coming.
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.
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".
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! 😷