Hasty Briefsbeta

Bilingual

build system tradeoffs

a day ago
  • Cross-compiling requires a toolchain and standard library for the target, which varies by language and platform.
  • Dynamic linking allows platform maintainers to update libraries system-wide, but application developers often prefer static linking for reliability.
  • Build configuration should use a real programming language (e.g., Starlark, Groovy) rather than a limited declarative format like YAML.
  • Serializing the build graph (e.g., Ninja) enables useful queries and incremental builds but requires full upfront knowledge of dependencies.
  • Dependency tracking approaches range from manual (make), compiler-supported, ephemeral full rebuilds, hermetic (Bazel, Nix), to tracing (Tup, Ekam), each with tradeoffs in correctness, cost, and platform support.
  • Hermetic builds guarantee reproducibility and enable remote caching, but demand exhaustive dependency specification.
  • Tracing build systems automatically record dependencies but are platform-specific and face scaling challenges at large codebases.
  • Most build systems do not prioritize correctness; combining tracing with hermetic methods may offer a balance of reliability and ease.