Setup

Get MicroRaft into your project or run the repository locally in a few minutes.

./gradlew :microraft-tutorial:test --tests io.microraft.tutorial.OperationCommitTest
Use this page when You want the fastest path from clone or dependency declaration to a visible local run.
Leave with A working local command, dependency coordinates, and the right next docs to open.
Read next Go to Main Abstractions if you are integrating, or the tutorial if you want runnable code first.

Add the dependency

MicroRaft JARs are available via Maven Central.

Gradle version catalog

[versions]
microraft = "0.9"

[libraries]
microraft = { module = "io.microraft:microraft", version.ref = "microraft" }

Gradle Kotlin DSL

implementation("io.microraft:microraft:0.9")

Maven

<dependency>
    <groupId>io.microraft</groupId>
    <artifactId>microraft</artifactId>
    <version>0.9</version>
</dependency>

Build from source

If you want to inspect or run the repository locally, clone it and use the Gradle wrapper.

gh repo clone MicroRaft/MicroRaft
cd MicroRaft
./gradlew build

The built artifacts land under microraft/build/libs, microraft-hocon/build/libs, and microraft-yaml/build/libs.

Quick Start

Run the local 3-node tutorial cluster before integrating the library into your own service.

./gradlew :microraft-tutorial:test \
  --tests io.microraft.tutorial.OperationCommitTest
  • the build targets Java 11
  • make sure Java 11 is installed locally before running the command
  • LeaderElectionTest is the shortest smoke test for cluster formation