Notes/BXM

BXM Joins the Studio With Canon and Memo, One Encoding for Data and One Cache for Work

BXM is the studio’s twenty-sixth project. Its two tools share a rule: the same input should give the same bytes and the same result. Canon, in Rust, applies that rule to data. Memo, in Go, applies it to work.

BXM Canon is a binary encoding where every value has exactly one valid form. Two programs that write the same data get the same bytes, so a hash or signature made on one machine still checks out on another. The decoder refuses anything that isn’t that one form. Version 0.1.0 shipped a Rust library, a command and a C API, plus a short spec and 60 conformance vectors. The same core then went to JavaScript as WebAssembly in 0.2.0 and to Python in 0.3.0. Every language runs one implementation, so there’s no second one to drift.

BXM Memo goes in front of a build step and skips it when nothing it reads has changed. It puts the outputs back and replays the original output. When it does have to run, it says which input changed. It’s a single Go binary. On the 2-CPU machine the site quotes, a step that took 2.6 seconds came back from the cache with its 200 files in 61 ms.

The testing targets each tool’s main promise. The Canon decoder took 2,000,000 random and damaged byte strings in one recorded run and never accepted a second form of any value. Memo was shared by 16 processes at once, killed mid-run and fed a corrupted cache, and it never left a wrong or half-restored output. Memo fits CI next to jvq: one skips work that hasn’t changed, the other times the work that has.

Both are open source under Apache 2.0, with releases for Linux, macOS and Windows.