Buck2 for OCaml Users & Developers
summary
Buck2 is Meta’s Rust‑written build system used by thousands daily and claims faster OCaml support via remote execution and aggressive caching — a full remote build for a Python‑style workload takes about 12 seconds in their benchmark. Rules are multilanguage and exchange providers, enabling OCaml to link with C++ and call Rust (and vice versa). OCaml features shown: pre-built ocaml libraries from opam, PPX integration, native and bytecode targets, wrapped‑library support, and a dynamic dependency flow driven by an ocaml-deps extraction.
AI-written summary · about
chapters (15)
- 0:00Buck2 for OCaml intro
- 1:19What Buck2 is
- 3:28Buck2 multi-language support
- 6:41Practical Buck2 setup
- 8:51Buck2 OCaml rules
- 9:35Third-party OCaml libraries
- 11:23OCaml source files & C interop
- 12:52PPX rewriters in Buck2
- 14:57Embedding OCaml in other languages
- 15:42Wrapped OCaml libraries
- 19:12Buck2 vs Dune benchmark
- 21:43Q&A: Dune to Buck2
- 22:04Q&A: Multiple PPX rewriters
- 22:48Q&A: Buck2 features
- 23:32Q&A: Buck2 at Meta
related talks
34mTowards Dream Haskell Build Experience
19mHomogeneous builds with OBuilder and OCaml
43mOCaml at LexiFi
31mBazel: Do We Really Need Another Build Tool?
28m"Shipping Rust to Python, Typescript, and Ruby Users"
21mFast/Correct: Choose two using Bazel for a monorepo
12mCopying opam switches – it should Just Work™
27mTry-Mopsa: Relational Static Analysis in Your Pocket
