Skip to content

Latest commit

 

History

History
120 lines (77 loc) · 3.62 KB

slides.md

File metadata and controls

120 lines (77 loc) · 3.62 KB
title theme highlight-theme css revealOptions
RE with Nix + Buck2
dracula
solarized
assets/style.css
transition
fade

Remote Execution with Nix + Buck2

by Claudio Bley

FOSDEM'25 — 1st February 2025

Note: Me, scalable builds group, tweag. Polyglot build system.


Background

  • Mercury https://mercury.com/
  • large Haskell code base, > 10k modules
  • uses flakes ❄
  • migration to Buck2

Buck2

https://buck2.build/

fast, reliable, extensible

  • polyglot build system from Meta
  • supports distributed builds and caching

Notes: still being worked on, no official release yet, just use latest snapshots, OSS version / internal version, support for telemetry and persistent remote worker support by Andreas


Remote Execution

  • Faster build and test execution through scaling of nodes available for parallel actions
  • A consistent execution environment for a development team
  • Reuse of build outputs across a development team

source: Bazel Remote Execution Overview


Remote Execution

  • Linux: custom Docker build image
  • macOS: more challenging, expensive

=> re-use Linux setup and build for Linux on macOS

Bazel remote execution with rules_nixpkgs


Nix: Remote Builders

  • forward builds to other machines
  • multiple builds in parallel
  • multi-platform builds
builders = @/etc/nix/machines
ssh-ng://nix@x1 x86_64-linux /root/.ssh/id_ed25519 5 1 big-parallel,kvm,nixos-test - -

Buck2: Remote Execution

  • OSS variant: Bazel remote APIs (execution, asset, logstream)
  • services (Buildbarn, NativeLink, BuildBuddy, EngFlow, ...)
  • clients (Bazel, Buck2, Pants, Recc, ...)

API Users


Buck2: Remote Execution

  • distributed to workers
  • works on the action level
  • caching
  • telemetry / UI / graphs

Demo

Notes: cells, toolchains, targets, dependency graph


Thank you

buck2 nix 🟰
Questions?

Notes: convinced that combining buck2 + nix is a match