Fast Migration
Analyze and migrate your project in seconds. No manual BUILD file writing required.
# Add the tap and installbrew tap albertocavalcante/tapbrew install albertocavalcante/tap/rebaze
# Migrate your projectrebaze migrate /path/to/your/project# Requires GitHub token for private repo accessexport HOMEBREW_GITHUB_API_TOKEN="$(gh auth token)"
# Add the tap and install nightly (prebuilt binaries)brew tap albertocavalcante/tapbrew install albertocavalcante/tap/rebaze-nightly
# Migrate your projectrebaze migrate /path/to/your/project# Clone and build with Bazelgit clone https://github.com/albertocavalcante/rebaze && cd rebazebazel build //crates/rebaze-cli:rebaze
# Run directlybazel run //crates/rebaze-cli:rebaze -- migrate /path/to/your/projectThat’s it. Your CMake or Gradle project now has Bazel build files.
Fast Migration
Analyze and migrate your project in seconds. No manual BUILD file writing required.
Smart Dependencies
Automatically maps CMake find_package() and Gradle dependencies to Bazel targets.
Configurable
Customize mappings, rules, and strategies via rebaze.toml configuration.
Hermetic Builds
Optional source builds with rules_foreign_cc for fully reproducible builds.
Full parser + cmake-file-api integration
Groovy and Kotlin DSL
Detection only
Before: CMakeLists.txt
cmake_minimum_required(VERSION 3.14)project(myapp)
find_package(ZLIB REQUIRED)add_library(mylib src/lib.cpp)target_link_libraries(mylib ZLIB::ZLIB)add_executable(myapp src/main.cpp)target_link_libraries(myapp mylib)After: Run rebaze migrate .
module(name = "myapp", version = "0.1.0")bazel_dep(name = "rules_cc", version = "0.1.1")bazel_dep(name = "zlib", version = "1.3.1")load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
cc_library( name = "mylib", srcs = ["src/lib.cpp"], deps = ["@zlib"],)
cc_binary( name = "myapp", srcs = ["src/main.cpp"], deps = [":mylib"],)Before: build.gradle
plugins { id 'java'}dependencies { implementation 'com.google.guava:guava:32.1.3-jre' testImplementation 'junit:junit:4.13.2'}After: Run rebaze migrate .
module(name = "myapp", version = "0.1.0")bazel_dep(name = "rules_java", version = "7.4.0")bazel_dep(name = "rules_jvm_external", version = "6.0")load("@rules_java//java:defs.bzl", "java_binary", "java_library")
java_library( name = "lib", srcs = glob(["src/main/java/**/*.java"]), deps = ["@maven//:com_google_guava_guava"],)