Best of WebAssemblyJanuary 2025

  1. 1
    Article
    Avatar of htmxhtmx·1y

    > htmx ~ A Real World wasm to htmx Port

    The author shares their experience of rewriting Sidekick, a customer service software, from a complex Rust and WASM-based architecture to a simpler HTMX-based system. This change significantly improved load times and made it easier to add new features, which is crucial for their startup. The rewrite process took about three weeks and led to a more maintainable and efficient codebase.

  2. 2
    Article
    Avatar of hnHacker News·1y

    An embedded scripting language for Rust.

    Rhai is an embedded scripting language for Rust that provides an easy and safe way to add scripting to applications. It supports all CPU and OS targets of Rust, including WebAssembly and `no-std`. Rhai features a JavaScript-like syntax with dynamic typing, minimal dependencies, and tight integration with Rust functions and types. It offers robust security features, customizable APIs, and capabilities for object-oriented programming. The scripting engine is sandboxed and protected against various attacks, ensuring stability and security.

  3. 3
    Article
    Avatar of hnHacker News·1y

    A WebAssembly compiler that fits in a tweet

    A small WebAssembly compiler is demonstrated, showcasing how an arithmetic expression in reverse polish notation can be turned into a WebAssembly module in just 192 bytes. The post deconstructs code optimization tricks used to minimize the byte size, including variable reuse, sparse arrays, coercion, and other code golfing techniques. Understanding these tricks offers insights into WebAssembly and compiler design.

  4. 4
    Video
    Avatar of tsoding_dailyTsoding Daily·1y

    The Jai situation is insane!

    The game discussed in this post was originally developed in Jai, a programming language by Jonathan Blow. However, the particular version of this language (1.033) is no longer available, making it impossible to recompile the game even though the source code and web assembly binary are available. The author plans to port the game to a newer version of Jai and potentially add more features. They also mention the unique challenges they faced, such as the current version of Jai only supporting WM 64, while the game is in 32-bit, which required patching with a special tool to make it work.