OBuilder Extends to Windows with Native HCS Container Backend
Key Takeaways
- ▸OBuilder now supports native Windows container builds via a new HCS (Host Compute System) backend using containerd
- ▸The Windows implementation uses a split storage model with VHDX files managed by containerd, unlike filesystem-based backends on other platforms
- ▸The extension follows OBuilder's modular architecture with three specialized modules for Windows: hcs_store, hcs_sandbox, and hcs_fetch
Summary
OBuilder, a sandboxed build executor for OCaml CI pipelines developed by Thomas Leonard, now supports native Windows container builds through a new Host Compute System (HCS) backend. The extension, developed by Mark Elvers, enables OBuilder to use Microsoft's Host Compute Service and containerd on Windows, joining existing backends for Linux, macOS, FreeBSD, and QEMU-based systems. The HCS backend leverages Windows' native container infrastructure, storing filesystem snapshots as VHDX files in containerd's managed storage while maintaining OBuilder's characteristic build caching and incremental build capabilities.
OBuilder processes build specifications written in S-expression syntax (similar to Dockerfiles) by executing each step in an isolated environment and caching results at the filesystem level. The new Windows implementation follows OBuilder's modular functor architecture with three specialized modules: hcs_store.ml for snapshot management, hcs_sandbox.ml for container execution, and hcs_fetch.ml for base image handling. Unlike typical OBuilder backends that use filesystem features like BTRFS or ZFS snapshots, the HCS backend adopts a split storage model where the OBuilder results directory contains JSON pointers to actual VHDX layer data managed by containerd in C:\ProgramData\containerd\snapshots.
The development represents a significant expansion of OBuilder's cross-platform capabilities, bringing the same build caching and reproducibility features to Windows environments. This enables OCaml developers working on Windows to benefit from the same efficient, incremental build workflows available on other platforms, with the added advantage of native Windows container support rather than relying on virtualization layers.
- Windows support completes OBuilder's cross-platform coverage alongside existing Linux, macOS, FreeBSD, and QEMU backends



