
Going Back in Time to Reinvent the Tree with Zig
Over the Christmas holiday, I migrated the classic UNIX tree utility to Zig, creating a modernized fork called bo. The original tree project has been around since the 90s, displaying directory structures in a hierarchical format. While the C codebase is elegant, it carries decades of legacy baggage. Obsolete platform support, ancient Makefile, and preprocessing macros for long-dead operating systems. The migration resulted in a lot of deleting which is a lot of fun and I replaced the Makefile with Zig’s build system, removed support for OS/2 and proprietary HP systems, deleted the archaic .lsm metadata format, and embedded the man page directly into the binary. This post walks through the technical decisions and trade-offs of modernizing a 30-year-old C project. ...



