Skip to content

christianscott/a-really-simple-build-tool

Repository files navigation

A really simple build tool

A simple build tool that implements a subset of the features that Bazel supports. Built as a learning tool to help me understand how Bazel works in a bit more depth.

Features

  1. Sandboxing
  2. Genrules
  3. Building a subset of the graph (i.e. specifying a single entrypoint and only building its dependencies)

Features I'd like to add

  1. Remote cache, with a disk cache as a special case
  2. Remote execution
  3. Parallel builds
  4. Executable outputs + runfiles

Features I probably won't add

I probably won't be adding these because their implementations are not super interesting to me.

  1. Persistent action cache (i.e. Bazel without a remote cache or --disk_cache)
  2. Config DSL like starlark
  3. Support for custom rules, or any rule other than genrules
  4. Cross-platform builds
  5. Test runner

Usage

Notice that the output paths do not have the platform-specific sections that they would in bazel. These are elided for the sake of simplicity.

# node src/main.js build :one.txt
Executing genrule for one
# find /private/var/tmp/_bazel_christian.s/1656c0c543ef2bf12fc92766a305649f/execroot | print-paths-as-tree
private/var/tmp/_bazel_christian.s/1656c0c543ef2bf12fc92766a305649f/execroot
├── sandbox
└── one.txt

0 directories, 0 files

# node src/main.js build :combined.txt
Executing genrule for one
Executing genrule for two
Executing genrule for combined
# find /private/var/tmp/_bazel_christian.s/1656c0c543ef2bf12fc92766a305649f/execroot | print-paths-as-tree
private/var/tmp/_bazel_christian.s/1656c0c543ef2bf12fc92766a305649f/execroot
├── combined.txt
├── two.txt
├── sandbox
└── one.txt

0 directories, 0 files

About

A simple build tool that does some of what Bazel does

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published