# Buck2 build system for Cabal projects

**URL:** <https://discourse.haskell.org/t/buck2-build-system-for-cabal-projects/14770>\
**Category:** Announcements\
**Created:** [September 30, 2026, 11:18am UTC](https://discourse.haskell.org/t/buck2-build-system-for-cabal-projects/14770 "2026-09-30T11:18:32Z")\
**Posts on this page:** 1\
**Showing post:** 29

<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:** [October 5, 2026, 9:28am UTC](https://discourse.haskell.org/t/buck2-build-system-for-cabal-projects/14770/29 "2026-10-05T09:28:10Z")

</div>

> [@jackdk](#):
>
> I was very impressed by some of the talks I saw, but everything I looked at seemed to be experimental software that didn’t explain anything. How does one get started with Buck2? I failed to find a description of its theory of operation, or how to understand its syntax for naming targets, or… anything really, and gave up

The documentation has historically been lacking. It’s a bit better now, although some of the more obscure parts are still obscure - I have a lot of trouble with configuration resolution for example. But anyway, you could try looking at

> **[Architectural Model | Buck2](https://buck2.build/docs/concepts/architecture/)**
>
> High-level Overview

and in particular for target naming: [Build Target | Buck2](https://buck2.build/docs/concepts/build_target/)

The essence of it all is staged computation. The first stage evaluates all the build files, which are written in [Starlark](https://github.com/bazelbuild/starlark/blob/master/spec.md) (a pure subset of Python), and running these produces a graph of build rules. The implementation of each rule type is also written in Starlark, and the second stage evaluates the rules to produce an action graph: a graph of build actions where the edges are artifacts. This is what’s new about Buck 2 - in Buck 1 the rule implementations were written in Java in Buck itself, which made it really hard to modify and test any changes. In Buck 2 I can fiddle with the Haskell rules and get instant feedback. The language and API design rules out side effects in the `BUCK` files, and makes it really hard to write build code with untracked dependencies in the rule implementations.

---

_[View the full topic](https://discourse.haskell.org/t/buck2-build-system-for-cabal-projects/14770)._
