How to Install the Brush Project Locally: Complete Setup Guide

To install the Brush project locally, clone the ArthurBrussee/brush repository, ensure you have Rust 1.88 or newer installed, and run cargo run --release for desktop builds, npm install && npm run dev for the web demo, or configure the Android NDK and use cargo-ndk for mobile targets.

Brush is a Rust-based 3D Gaussian splatting reconstruction engine organized as a Cargo workspace. Installing it locally enables you to train radiance field models on native desktop platforms, compile the training engine to WebAssembly for browser-based demos, or integrate the core library into Android applications. This guide covers the complete installation process for all supported platforms based on the official repository structure.

Prerequisites

Before building Brush, ensure your system meets the minimum toolchain requirements.

Rust Toolchain

Brush requires Rust 1.88+. Install or update via rustup:

rustup update
rustc --version  # Verify 1.88 or higher

Optional Visualization Tools

For real-time visualization during training, install the Rerun viewer:

cargo install rerun-cli

Clone the Repository

Download the source code from GitHub:

git clone https://github.com/ArthurBrussee/brush.git
cd brush

The repository is organized as a Cargo workspace where the root Cargo.toml defines all crates including brush-train, brush-render-bwd, brush-dataset, and the application entry points.

Platform-Specific Build Instructions

Choose your target platform and follow the corresponding build steps. The workspace default member is brush-app located in apps/brush-app, so commands run from the repository root automatically target the correct application.

Desktop (Windows, macOS, Linux)

For native desktop builds, use Cargo's release profile for optimized performance:

cargo run --release

For development builds with debug symbols, omit the --release flag:

cargo run

This compiles the brush-app crate and its dependencies, including the training and rendering pipelines defined in crates/brush-train/src/lib.rs and crates/brush-render-bwd/src/lib.rs.

Web (WebAssembly)

The brush-js crate in apps/brush-js provides WebAssembly bindings for browser deployment.

First, install Node.js dependencies:

npm install

Then start the development server:

npm run dev

This launches a Vite-based dev server exposing the demo at http://localhost:5173. The WebAssembly bindings allow you to initialize Brush using the BrushApp class and start training directly from JavaScript:

import { BrushApp } from 'brush-js';

async function start() {
  const app = new BrushApp();
  await app.init();
  const dir = await window.showDirectoryPicker();
  const training = app.startTrainingFromDirectory(dir, cfg => cfg);
}

Android

Building for Android requires the Android SDK and NDK. Set the following environment variables:

export ANDROID_NDK_HOME=/path/to/android-ndk
export ANDROID_HOME=/path/to/android-sdk

Add the Android target and install cargo-ndk:

rustup target add aarch64-linux-android
cargo install cargo-ndk

Build the native library and place it in the expected JNI directory:

Debug build:

cargo ndk -t arm64-v8a -o crates/brush-app/app/src/main/jniLibs/ build

Release build:

cargo ndk -t arm64-v8a -o crates/brush-app/app/src/main/jniLibs/ build --release

This generates the shared library in crates/brush-app/app/src/main/jniLibs/arm64-v8a/ for the Android application to consume.

Verify Your Installation

Run the complete test suite to ensure all workspace crates compile and function correctly:

cargo test --all

If tests pass, you can begin training by loading a COLMAP or Nerfstudio dataset using the API provided in crates/brush-dataset/src/lib.rs or through the CLI interface in apps/brush-cli/src/lib.rs.

Summary

  • Brush is a Rust-based 3D reconstruction engine organized as a Cargo workspace in the ArthurBrussee/brush repository.
  • Requirements: Rust 1.88+, with optional rerun-cli for visualization.
  • Desktop: Run cargo run --release from the repository root to build the native application.
  • Web: Execute npm install && npm run dev to serve the WebAssembly demo at localhost:5173.
  • Android: Configure ANDROID_NDK_HOME and ANDROID_HOME, then use cargo-ndk to build for arm64-v8a.
  • Testing: Validate your installation with cargo test --all.

Frequently Asked Questions

What Rust version is required to install Brush locally?

Brush requires Rust 1.88 or newer. You can verify your version by running rustc --version in your terminal. Update your toolchain using rustup update if necessary, as specified in the repository README.

How do I build Brush for Android devices?

First, set the ANDROID_NDK_HOME and ANDROID_HOME environment variables. Add the Android target with rustup target add aarch64-linux-android and install cargo-ndk via cargo install cargo-ndk. Then build the library using cargo ndk -t arm64-v8a -o crates/brush-app/app/src/main/jniLibs/ build --release, which outputs the native library to the JNI directory expected by the Android application.

Can I run Brush in a web browser?

Yes. The brush-js crate provides WebAssembly bindings. After running npm install in the repository root, use npm run dev to start a Vite development server. The JavaScript API exposes the BrushApp class for initializing WebGPU and starting training loops directly in the browser, as implemented in the apps/brush-js source.

How do I run tests for the Brush workspace?

Execute cargo test --all from the repository root. This command runs the full test suite across all workspace members, including brush-train, brush-render-bwd, and brush-dataset, ensuring your local installation is functioning correctly before running training jobs.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →