Skip to content

Quick Start

Migrate any CMake or Gradle project to Bazel in three commands.

  1. Analyze — See what rebaze detects

    Terminal window
    rebaze analyze .
    Detected build systems: cmake
  2. Migrate — Generate Bazel files

    Terminal window
    rebaze migrate .
    • MODULE.bazel
    • BUILD.bazel
    • .bazelversion
    • .bazelrc
  3. Build — Verify it works

    Terminal window
    bazel build //...

Done. Your project now builds with Bazel.


Use --dry-run to see what would be generated:

Terminal window
rebaze migrate . --dry-run

Create rebaze.toml for custom dependency mappings:

[mappings.system_libraries]
myvendorlib = "@myvendor//:lib"
[strategy]
default = "system"

Then migrate:

Terminal window
rebaze migrate . --config rebaze.toml
[mappings.system_libraries]
customlib = "@customlib"
[strategy]
default = "source"
[versions]
rules_cc = "0.1.1"
googletest = "1.15.2"

“Unknown library ‘xyz’, skipping” → Add to [mappings.system_libraries] in rebaze.toml

Build fails after migration → Check include paths and verify all sources are captured

Missing dependencies → Run with --verbose to see what rebaze detected