Skip to main content

Prerequisites

Before you begin, make sure you have the following installed:

Java 21

Required and enforced at build time. Java 21 is needed for Kryo reflection used in binary serialization.

SBT

Scala Build Tool — the primary build system for the project.

Docker

Required for the Docker-based test environment (just test, just up).
Java 21 is enforced at build time. Attempting to build with an older JDK version will result in a build failure.

Clone and set up

1

Fork the repository

Fork the repository on GitHub:
https://github.com/Constellation-Labs/tessellation/fork
2

Clone your fork and add upstream

Clone your fork locally, then add the upstream remote so you can sync changes:
git clone https://github.com/<your-github-account>/tessellation
cd tessellation
git remote add upstream https://github.com/Constellation-Labs/tessellation
3

Verify Java 21

Confirm you are running Java 21:
java -version
The output should report version 21. If not, install Java 21 and ensure it is on your PATH.
4

Verify SBT

Confirm SBT is installed:
sbt --version
5

Compile the project

Run a full compile to verify everything is wired up correctly:
sbt compile
A successful compile confirms that Java 21, SBT, and all dependencies are correctly configured.

JVM options

The repository ships a .jvmopts file that SBT picks up automatically. It configures the JVM heap and compiler settings for the build:
-Dfile.encoding=UTF8
-Xms1G
-Xmx5G
-XX:ReservedCodeCacheSize=500M
-XX:+TieredCompilation
-XX:+UseParallelGC
These settings are applied automatically when you run sbt. You do not need to set them manually.

IDE setup

The recommended IDE is IntelliJ IDEA with the Scala plugin. To enable automatic scalafmt formatting on save within IntelliJ, follow the JetBrains scalafmt integration guide. This ensures your code is formatted consistently with the project’s .scalafmt.conf settings before you commit.
Even with IDE formatting enabled, run sbt runLinter before committing. The CI pipeline runs the linter as a quality gate and will fail if formatting or import ordering is incorrect.

Nix flake (alternative)

For contributors who use Nix, the repository provides both a flake.nix and a shell.nix that set up the full development environment declaratively, including the correct Java version and tooling.
# With Nix flakes enabled
nix develop

# Or with the legacy shell.nix
nix-shell

Build docs developers (and LLMs) love