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 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 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, 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.
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.
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.
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%.
A tutorial on how to use WebAssembly to implement a gRPC client in the browser through the Microsoft .Net Blazor framework.
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.
Autograph is a machine learning library written in Rust.
CPU and CUDA are fully supported
Flexible (Dynamic Backward Graph)
This Tetris game is written in Rust and compiled to WebAssembly. You can play it in the browser. Give it a try.
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.
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.
InfoQ published an in-depth article on the rise of Rust. Developer’s love for Rust is translating into real-world adoption.
RustCrypto's sha-1 and sha2 implementations now support hardware acceleration on both x86 and ARM.
An internal Google Docs provides some insights into the challenges Deno team faced when using TypeScript internally.
Salesforce functions will enable developers to build serverless applications on top of Salesforce.
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! 😷