Skip to content

Introduction

rebaze analyzes your CMake or Gradle project and generates Bazel build files automatically.

Terminal window
rebaze migrate /path/to/project

Output:

  • MODULE.bazel — Dependencies and module definition
  • BUILD.bazel — Build targets for your code
  • .bazelversion — Pins Bazel 9.x
  • .bazelrc — Sensible defaults

1. Analyze

Detects your build system and parses build files

2. Transform

Maps dependencies to Bazel targets

3. Generate

Writes MODULE.bazel and BUILD.bazel files

4. Validate

Verifies the migration builds successfully

If you’re considering Bazel, you probably already know why. For the record:

BenefitWhat it means
Fast incremental buildsOnly rebuilds what changed
Hermetic buildsSame inputs → same outputs, always
Remote cachingShare build artifacts across your team
Remote executionDistribute builds across machines
Multi-languageC++, Java, Go, Python in one repo

Manual migration is tedious:

  1. Learning Starlark syntax
  2. Writing BUILD files for every directory
  3. Mapping every dependency to Bazel targets
  4. Handling platform-specific configurations

rebaze handles all of this. You focus on your code.

SourceStatusNotes
CMakeSupportedFull parser + cmake-file-api
GradleSupportedGroovy and Kotlin DSL
MavenPlannedDetection only

Be aware of current limitations:

  • CMake: Generator expressions partially supported
  • Gradle: Android projects not yet supported
  • General: Custom build logic may need manual migration

Ready? Pick your path: