Back to directory
sbt avatar

zinc

Scala incremental compiler library, used by sbt and other build tools. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/sbt/zinc.git

351

Stars

131

Forks

18

Watchers

Apache-2.0

License

Zinc is the incremental compiler for Scala.

Most Scala developers use it constantly without noticing. It's leveraged by build tools such as sbt, IntelliJ, Maven, Gradle, Mill, Pants, Bazel, and Bloop.

Zinc reduces compilation times without sacrificing correctness. When you change a source file, Zinc analyzes the structure of your code and recompiles only the source files affected by your change. The result should be identical to the output of a clean compile.

Code of conduct

All communication in sbt/* repositories and chat rooms is covered by Scala Code of Conduct. Please be kind and courteous to each other.

Contributing

This project is maintained by Lightbend, the Scala Center, and other OSS contributors.

You're welcome to participate. To learn how, see the CONTRIBUTING guide.

Integrating Zinc

Most Scala users don't need to think about Zinc at all. Just use any of the build tools listed above, and you get Zinc's benefits.

If you're a build tool author, add Zinc to your project with:

libraryDependencies += "org.scala-sbt" %% "zinc" % "$ZINC_VERSION"

where $ZINC_VERSION is the latest tag pushed to the GitHub repository.

To integrate Zinc, you have two options:

  1. Interface directly with Zinc APIs and maintain your own integration.
  2. Use Bloop (which has a compilation server that simplifies tooling integrations).

Note to compiler bridge authors

The compiler bridge classes are loaded using java.util.ServiceLoader. In other words, the class implementing xsbti.compile.CompilerInterface2 must be mentioned in a file named: /META-INF/services/xsbti.compile.CompilerInterface2.

Acknowledgements

Logo Acknowledgement
We thank Yourkit for supporting this open-source project with its full-featured profiler.

Releases

Aug 6, 2026

1.12.1

Download .zip

updates

bport: Make libraryClassName relation deterministic under concurrency by @lihaoyi in #1638

behind the scenes

Bump sbt and Scala versions by @eed3si9n in #1762

Full Changelog: v1.12.0...v1....

Jul 26, 2026

2.0.4

Download .zip

Updates

perf: Intern analysis values while deserializing by @hoangmaihuy in #1754

Full Changelog: v2.0.3...v2.0.4

Jul 24, 2026

2.0.3

Download .zip

Updates

perf: Intern directory item conversions in MappedFileConverter by @hoangmaihuy in #1751

Full Changelog: v2.0.2...v2.0.3

Jul 23, 2026

2.0.2

Download .zip

๐Ÿ› bug fixes

fix: Fixes hashes for directories in MappedVirtualFile by @raboof in #1747 deps: Update sjson-new-scalajson to 0.15.1 by @scala-steward in #1742

Full Changelog: v2.0.1...v2.0.2

Jun 29, 2026

2.0.1

Download .zip

๐Ÿ› bug fixes

fix: Fixes IllegalAccessError analyzing Java compiled with --add-exports by @jozanek in #1714 / #1729 fix: Fixes Java-to-Java dependencies on inlined constants tracking by @jozanek in #1...