hx vs Cabal and Stack
Cabal and Stack are the established Haskell build tools. hx is a single fast binary that wraps and replaces both — without asking you to leave your existing projects behind.
The short version
hx is a native Rust binary that does what Cabal and Stack do — build, test, run, format, lint, publish — from one command, with managed toolchains and deterministic lockfiles. It reads your existing .cabal files and resolves from Hackage, so adopting it does not mean rewriting anything.
If you want the honest one-liner: hx is to the Haskell toolchain what cargo is to Rust. One tool, fast, predictable.
Speed
Every number below is hx against cabal 3.12.1.0 and stack 2.15.1 on the same machine and project. hx is a native binary with no GHC runtime to start, which is most of the difference.
| Operation | hx | Cabal | Stack | Speedup |
|---|---|---|---|---|
| CLI startup | 12ms | 45ms | 89ms | 3.8× / 7.4× |
| Project init | 68ms | 320ms | 2.1s | 4.7× / 31× |
| Cold build (simple) | 0.48s | 2.68s | 3.2s | 5.6× / 6.7× |
| Incremental build | 0.05s | 0.39s | 0.52s | 7.8× / 10.4× |
| Clean | 8ms | 180ms | 95ms | 22× / 12× |
The gap is widest where it is felt most: the dozens of small commands you run every day.
Workflow
| hx | Cabal | Stack | |
|---|---|---|---|
| Build / test / run / format / lint / publish | One tool | Cabal + external tools | Stack + external tools |
| Managed compiler toolchains | GHC and BHC | via ghcup | curated resolvers |
| Lockfiles | Deterministic TOML, checksum-verified | cabal.project.freeze | stack.yaml.lock |
Reads existing .cabal files | Yes | Yes | Yes |
| Distribution | Single static binary | Haskell binary | Haskell binary |
| Plugins | Steel (Scheme) plugin system | — | — |
Will it work with my project?
Yes. hx reads .cabal files directly and resolves dependencies from Hackage, and it can import existing Cabal or Stack projects. You can adopt it incrementally — use hx build where it helps and keep everything else as it is. Nothing about your package, your dependencies, or your code has to change.
When to use which
Use hx if you want one fast tool for the whole workflow, deterministic builds, managed GHC/BHC toolchains, and instant commands.
Stick with Cabal or Stack if you depend on a workflow detail hx does not cover yet, or your team’s tooling is deeply wired into one of them — and revisit hx as it matures. hx is compatible either way, so there is no lock-in to trying it.
Get started with hx → · Full benchmarks → · Why we built it in Rust →