
Welcome to nickb.dev, a blog by Nick Babcock! Below are my most recent articles. You can find the history of all my writings in the archive or just find out more about me.


Recommendations when publishing a Wasm library
Published on: A set of recommendations to make publishing a Javascript library that uses Wasm internally easier for application developers. There are a significant number of use cases and edge cases that we’ll code around as we try and cater to several types of developers: from those who may not know or care about Wasm and the broader JS ecosystem, to more experienced developers who want to optimize every last drop.
Don't freak, but our Rust web server is now Node.js
Published on: Even when the core business logic needs to be in Rust for performance, code reuse, or platform specific behavior, it doesn’t mean one needs a Rust web server to communicate this business logic. There are ergonomic ways to bridge Rust into Node.js (or another runtime) so that one can take advantage of a more established web ecosystem.
Accessing public and private B2 S3 buckets in Rust
Published on: The AWS S3 Storage API is ubiquitous and has been picked up by other 3rd party storage vendors. This is excellent for developers and sysadmins as it facilitates integration testing and experimentation with cloud storage providers. Here’s how to access 3rd party S3 compatible endpoints with the newly released AWS Rust SDK
Authoring a SIMD enhanced Wasm library with Rust
Published on: All the pieces have come together for widespread Wasm SIMD usage. The majority of browsers and Node 16 LTS support Wasm SIMD out of the box, and Rust recently learned how to compile Wasm intrinsics. Now I need to port a library from x86 SIMD to Wasm SIMD and distribute it in such a way that will fallback to a non-SIMD implementation on unsupported devices.
Replacing an unavailable ZFS drive
Published on: The day I’ve known for a while has come: a drive in my ZFS array has become degraded. How come I didn’t know about this for four months and what am I doing to improve monitoring? What steps did I take to identify and replace the drive?
A workaround for Rust's lack of structural subtyping
Published on: Compared to other languages, the lack of structural subtyping in Rust can be considered a hindrance. Here I show that it can be worked around so that one can end up with idiomatic solutions in Rust and in languages like Typescript that support structural subtyping.
Reality check for Cloudflare Wasm Workers and Rust
Published on: With native Rust support announced for Cloudflare Workers, one may be eager to jump in head first. I know I wanted to. However, I tested out a few use cases and found it too limiting. Either the desired APIs weren’t available, code size was too large, or the program couldn’t run within resource constraints. I remain excited and will continue watching this space
Simulating the EU4 map in the browser with WebGL
Published on: There are several ways one can replicate EU4’s map. The most popular methods have been to either create a bitmap image and suffer from scaling issues or derive a bitmap tracing routine to convert into vector graphics. However to create the most realstic and performant render, one should turn to the GPU. I talk about how we accomplished this in Rakaly.