WebAssembly Today #7
Updates & commentaries on WebAssembly related technologies, including Rust, serverless, cloud, blockchain, and AI. Focus on the server-side.
Compile Wasm bytecode to C code for universal binaries! 🤗
Alon Zakai, the creator of WebAssembly, has a new project called wasm2c. As the name suggests, it compiles wasm bytecode to C (portable C), which can then be compiled to native executables on any computer. Why? He wants to make wasm useful outside of the browser, but WASI and Node.js extensions are still slow-moving. The portable C compiled from wasm has all the VM safety protections already built-in, and C compiler tools such as GCC are pretty much “universally” available. Definitely an interesting idea to watch.
Deno supports WASI 🦕
Deno v1.1.2 was released this week. The big news is that Deno now supports WASI in its built-in WebAssembly engine. WebAssembly is becoming a first-class citizen on Deno!
Fastly is investing in the WebAssembly ecosystem 😎
Fastly wrote up a nice blog article about its history and on-going efforts to support open source WebAssembly software and standards. You can run serverless functions on Fastly’s WebAssembly infrastructure.
Vite supports built-in WebAssembly 🎈
Vite, a Native ES module powered web dev build tool, released v1.0 beta. It supports built-in WebAssembly. You can simply import pre-compiled WebAssembly bytecode file and call its functions.
Unofficial WebAssembly-based packages for Yosys 🖥
YoWASPis an acronym for Yosys WebAssembly Synthesis & PnR. This project aims to distribute up-to-date FOSS FPGA tools compiled to WebAssembly via language package managers like Python’s PyPI. The reason that uses WebAssembly is that developers could build a single universal binary that runs on many OSes and CPUs with Wasm and Wasi.
WebAssembly is now supported in 90%+ browsers 👏
Over 90% of web browsers installed on mobile phones, tablets, and PCs today support WebAssembly. The exceptions are IE (it is no longer developed), and a few specialized mobile phone browsers such as Opera Mini and UC.
To Wasm or not to Wasm? 🎤
This performance benchmark shows that wasm is only about 20% faster than JS, and 20% slower than native. It demonstrates that for many common tasks, the V8 engine can execute JS code at a speed that is only 50% slower than native code. That is quite amazing. But we also acknowledge that for many tasks, the difference between JS and native / wasm could be 10,000%.
Implement a gRPC client in the browser 🚲
A tutorial on how to use WebAssembly to implement a gRPC client in the browser through the Microsoft .Net Blazor framework.
Build a QR code scanner with Rust and WebAssembly 🔨
A step-by-step tutorial on how to use WebAssembly (Rust and JavaScript) to build a QR code scanner for a web application.
Run WASI programs asynchronously with wasi_process 💡
Rust has excellent async / multi-threading support. But WebAssembly, being a simple VM, does not support multi-threading. This new project allows Rust programs to create threads, and run WebAssembly WASI programs in those threads asynchronously.
Rusty News
autograph, A machine learning library for Rust 🌇
Autograph is a machine learning library written in Rust.
Features:
Safe API
Thread Safe
CPU and CUDA are fully supported
Flexible (Dynamic Backward Graph)
A Tetris game with Rust and Wasm 📟
This Tetris game is written in Rust and compiled to WebAssembly. You can play it in the browser. Give it a try.
Review of xi-editor 🥳
Raph Levien published a blog article about his journey designing and developing the Xi editor in Rust. It is long but very thoughtful. Lots of lessons learned on how to design modern software using cutting edge technologies, and how the design impacts the community around it.
toyDB, a SQL database written in Rust
The toyDB is a pure Rust implementation of a distributed SQL database. It features a modern modular design with lots of test coverage. The author noted that it is a “toy” database intended for learning — not for production use.
Rust Breaks into TIOBE Top 20 Most Popular Programming Languages 😍
InfoQ published an in-depth article on the rise of Rust. Developer’s love for Rust is translating into real-world adoption.
RustCrypto added x86 intrinsics support for sha1 and sha2 🤓
RustCrypto's sha-1 and sha2 implementations now support hardware acceleration on both x86 and ARM.
Is Deno going to switch to JavaScript? 🦕
An internal Google Docs provides some insights into the challenges Deno team faced when using TypeScript internally.
Introducing deno_lint 🦕
The deno_lint project provides a linter for JavaScript or TypeScript. It is developed by the Deno team, but is useful for JavaScript or TypeScript projects beyond Deno. It helps you write better code.
Serverless world
Salesforce released its serverless functions 🤗
Salesforce functions will enable developers to build serverless applications on top of Salesforce.
Cloud-Native Data Security Company Open Raven Raises $15 Million 👏
Cloud-native data security platform Open Raven, a company that prevents breaches driven by modern speed and sprawl, announced that it has raised $15 million in Series A funding.
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! 😷