# \[ANN\] cabal-buck2 0.6.0.0: now with per-module compilation

**URL:** <https://discourse.haskell.org/t/ann-cabal-buck2-0-6-0-0-now-with-per-module-compilation/15219>\
**Category:** Announcements\
**Created:** [November 28, 2026, 12:21pm UTC](https://discourse.haskell.org/t/ann-cabal-buck2-0-6-0-0-now-with-per-module-compilation/15219 "2026-11-28T12:21:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/simonmar/32/5058_2.png) [@simonmar](https://discourse.haskell.org/u/simonmar)\
**Post date:** [November 28, 2026, 12:21pm UTC](https://discourse.haskell.org/t/ann-cabal-buck2-0-6-0-0-now-with-per-module-compilation/15219/1 "2026-11-28T12:21:53Z")

</div>

We’ve just made a [new release](https://hackage.haskell.org/package/cabal-buck2-0.6.0.0) of `cabal-buck2`, the Cabal extension that lets you use Buck2 as the build system for a Cabal project. There are some fairly major improvements in this release:

- Most notably, thanks to @michaelpj, Buck2 can now compile modules separately instead of using `--make`, unlocking significant extra parallelism including across package boundaries. We provide a GHC worker that caches and shares `hi` files across compilations, mitigating the extra cost of per-module compilation compared with `--make`. We’re calling this feature experimental for now so it’s not enabled by default, but it’s [easy to try it out](https://github.com/simonmar/cabal-buck2#using-per-module-compilation). See below for some performance results.
- The support code is now bundled with `cabal-buck2` and unpacked automatically, so there’s no need to manage a separate clone of the `haskell-buck2` repo any more.
- There are now a couple of Buck2-specific fields in `.cabal` for specifying more accurate dependencies: `x-buck2-run-tool-depends` and `x-buck2-ignore-build-tool-depends` for refining Cabal’s `build-tool-depends,` and `x-buck2-splice-depends` for refining `build-depends` when using TemplateHaskell.
- Various other changes and fixes described in the [changelog](https://hackage.haskell.org/package/cabal-buck2-0.6.0.0/changelog).

Here are some build times for compiling HLS, comparing `cabal`, Buck2 with `--make`, Buck2 per-module, and `cabal repl`. The results are for a clean build, and incremental builds that modify something central (hub-api), nothing at all (noop), something central but inconsequential (hub-comment), and a leaf module (leaf).

![Build times for haskell-language-server](https://raw.githubusercontent.com/simonmar/cabal-buck2/refs/heads/master/perf/hls.svg)

For HLS, Buck2 is significantly faster than Cabal in all cases, and sometimes even beats `cabal repl` on recompiles. There are [measurements for some other projects in the README](https://github.com/simonmar/cabal-buck2#performance).

Please try it out and let us know how you get on!

---

<div class="post-metadata">

**Author:** ![Ambrose](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ambrose/32/5672_2.png) [@Ambrose](https://discourse.haskell.org/u/Ambrose)\
**Post date:** [November 28, 2026, 3:54pm UTC](https://discourse.haskell.org/t/ann-cabal-buck2-0-6-0-0-now-with-per-module-compilation/15219/2 "2026-11-28T15:54:51Z")

</div>

Why do you think it beats `cabal repl` on recompiles sometimes? This is great. “But the package boundary!” was always a refrain people used to avoid being organized and having good code with packages.

---

<div class="post-metadata">

**Author:** ![simonmar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/simonmar/32/5058_2.png) [@simonmar](https://discourse.haskell.org/u/simonmar)\
**Post date:** [November 28, 2026, 5:17pm UTC](https://discourse.haskell.org/t/ann-cabal-buck2-0-6-0-0-now-with-per-module-compilation/15219/3 "2026-11-28T17:17:53Z")

</div>

> [@Ambrose](#):
>
> Why do you think it beats `cabal repl` on recompiles sometimes?

I think it’s because GHCi re-typechecks all the interfaces on a `:reload`, but I haven’t confirmed that.
