// readme

Hearth

The first Scala macros’ standard library.

Hearth helps you write robust, fast-to-compile, easy-to-maintain macros - for Scala 3, for Scala 2.13, or for both.

  • corner cases already handled - generic, opaque and singleton types, named tuples, enums, default values, recursive types - tested on Scala 2.13 and Scala 3, on JVM, Scala.js and Scala Native
  • building blocks instead of compiler trees - types, expressions, methods, case classes and enums, with error aggregation and logging built in
  • integrate a library once - a module on the classpath (e.g. for Cats, Iron or Refined) is picked up by every Hearth-based macro that asks Hearth about collections, options or wrapper types, with no extra imports
  • single-version or cross-compiled - Scala 3-only, Scala 2-only, or one macro for both; in single-version code the compiler’s own API stays available
  • general purpose - type class derivation, optics, dependency injection, mocking, parsers and more
  • exhaustive documentation and no dependencies on other ecosystems

Call for Feedback

Hearth is an evolution of the…