WebAssembly Linux Binary Format

This past week, I setup a custom binary format on my workstation for WebAssembly. Such formats can be setup without modifying the kernel thru the binfmt_misc capability built into the Linux kernel. This allows specifying an interpreter for files that are neither a native binary format nor a script starting with #!. In my case, I setup an interpreter for WebAssembly using the wasmtime runtime. To do so, I created a file at /etc/binfmt.

Crystal Wasm

Another weekend, another wabt-hole. I got crystal to compile to WebAsembly and then run in Brave, and it only took two days to get setup and get it to print out “Hello, World!” in the console. I have tried to use WebAssembly a couple of years ago, but dropped it once I failed to get a simple hello world program to function. This is the same reason I don’t have Haskell under my programming utility belt, no hello world.

libipfs 2 - Proof of Concept

About 26 hours later, and somewhere between 10 and 14 hours of programming in a language I had not used before, I have a libipfs at a Proof of Concept stage. I have a program written in crystal (because I am familiar with it and it lets you right C bindings in crystal) that initializing an IPFS node, connects to the bootstrap nodes, and downloads the CID from the ipfs-as-a-library example.