WebAssembly Today ✍️ #16
Updates & commentaries on WebAssembly related technologies, including Rust, serverless, cloud, blockchain, and AI. Focus on the server-side.
Editorial: We have a lot of exciting news on WebAssembly this week!
WebAssembly Today
Serverless Rust + WebAssembly 👏👏👏
This article teaches you how to use Rust + WebAssembly to create a serverless app for Machine Learning and Data Visualization.
embed-wasm 😎
The embed-wasm crate allows developers to write complete end-to-end applications in Rust. The backend is compiled into a native web server application, and the front end is compiled into wasm and served to the browser from the backend (and hence "embedding" the front end in the backend)
WebAssembly Reference Types in Wasmtime 😊
WebAssembly reference types are here! This blog post explains what it is and how it enables calling WebAssembly functions from non-JavaScript hosts. It is an very important step forward for WebAssembly on the server-side.
Motoko, a programming language for building directly on the internet 🤗
Motoko, targeting WebAssembly, is designed and developed by Difinity team. This blog post published on Stack Overflow explains why Motoko is invented. Motoko is the best language for the Internet of Computer, a decentralized cloud computing platform based on WebAssembly.
Ring language upgrade focuses on WebAssembly 😜
Ring is a general-purpose programming language. It supports imperative, procedural, object-oriented, functional, and declarative programming paradigms. Ring aims to support Qt WebAssembly in the version 1.13 release planned for September. Qt WebAssembly is a platform plugin for building Qt applications that can be integrated into your web pages.
WebAssembly Troubles 😱
This series of articles discuss issues with WebAssembly and proposals fixes.
Part 3: What About Alloca?
Part 4: Microwasm
Please note, those articles were written in 2019. They are not exactly new, but many of the issues and insights are still valid.
Lunatic: An Actor based WebAssembly runtime for the backend 👏
Lunatic is a WASM runtime inspired by Erlang and Go. It is written in Rust.
Its main features:
Actors are represented as WebAssembly instances.
Sandboxing and runtime permissions are granted and denied on a per-actor basis.
All blocking code is automatically transformed and executed asynchronously.
Lunatic is designed to run any WASM bytecode safely and efficiently.
Hand-written digits recognition with WebAssembly generated from MATLAB 🔢
The MATLAB coder compiled a classic neural network algorithm for hand-written digits recognition into WebAssembly. We also found a similar project using Rust functions and WebAssembly on the server-side to recognize the hand-written digits. See the code here(The readme.md file is written in Chinese.)
History of Microsoft Flight Simulator in WebAssembly 🏎
Microsoft Flight Simulator is all the rage during this pandemic. With WebAssembly, you can play this game in the retro mode in your browser too! Play the first four flight simulator games Microsoft developed from 1982 to 1989.
It’s written in C and compiled to WebAssembly through the LLVM compiler.
Fastly - Evaluating new languages for Compute@Edge 🔎
Compute@Edge, powered by the WebAssembly virtual machine Lucet, is going to support AssemblyScript and Go, besides the original Rust.
Wasm-smith, A WebAssembly test case generator ❤️
The WebAssembly test case generator, written in Rust, generates WebAssembly test functions to help find bugs fast. It is easy to use with cargo fuzz
and libfuzzer-sys
.
Video: Hacking the Mesh: Extending Istio with WebAssembly Modules ✌️
Istio, a popular Server Mesh product, supports WASM. This video shows how to extend Istio’s functionality by creating custom filters for Istio's proxy, Envoy, in any language that supports WASM.
Tutorials:
Hands-on WebAssembly: Try the basics. It’s a beginner guide for WebAssembly in the browser. You can follow along with C or Rust code examples.
Code generating a WebAssembly 6502 emulator from specifications. This tutorial teaches you how to create simulators for old hardware (think Atari computers) in WebAssembly.
Rusty news
Rust 1.46.0 is released 👏👏👏
Rust 1.46.0 is released. The biggest improvement? You can now put a lot more in const fn, allowing more computation to be done at compile time instead of runtime. That could drastically improve some Rust applications’ performance.
Trunk — Build, bundle & ship your Rust WASM application to the web 👍
Trunk is a CLI tool written in Rust. It provides a simple, zero-config tool for building Rust WebAssembly applications, bundling application assets (sass, CSS, images &c), and shipping it all to the web.
GlueSQL: SQL database fully written in Rust & WebAssembly support 🚀
GlueSQL is a SQL database library written in Rust. It provides a SQL query parser (sqlparser-rs), an execution layer, and optional storage space (sled). GlueSQL works inside web browsers due to its support for WebAssembly.
Rapier: 2D and 3D physics engines focused on performance 🌅
Rapier is the successor of nphysics and focuses on performance. Just like nphysics, it is split into two crates: rapier2d and rapier3d for 2D and 3D physics respectively. It is designed to be multithreaded right from the get go. It also requires less incremental compilation and saves on built time. It runs 5 to 8 times faster than nphysics.
RustConf Promotes a More Inclusive Community as Rust Grows 🦀
A recap of RustConf 2020. The full-day conference featured Rust developers and community members around the world. The talks ranged from the highly technical to beginner's introduction to games and child-friendly activities. The key message is clear — Rust is ready for mainstream adoption.
Serverless World
Red Hat redefines cloud-native management 😀
Red Hat has announced the general availability of Red Hat Advanced Cluster Management for Kubernetes, the latest addition to Red Hat’s portfolio of IT management technologies designed for the hybrid cloud.
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! 😷