Skip to content

Resources & Further Reading

A curated collection of external references that complement the Hearth documentation.

Derivation Theory

  • Sanely Automatic Derivation — blog post explaining why macro-internal recursion produces better error messages, handles recursive types out of the box, and simplifies the user-facing API compared to traditional semi-automatic or fully-automatic approaches.
  • Kindlings - repository which puts derivation theory into practice by implementing several derivation macros for Scala.

JVM & Runtime

  • JVM Scala Book — comprehensive reference covering JVM internals relevant to Scala developers, including class loading, bytecode, and runtime behavior that affects macro-generated code. (Disclaimer: I've written it.)

Official Scala Documentation

  • Scala Overviews — the index of official Scala documentation covering compiler options, reflection, collections, and more.
  • Library Author Guide — official guidance on publishing Scala libraries, including binary compatibility, versioning, and cross-building considerations.
  • Scala 2 macros documentation

    • Additionally I suggest opening code in a browser API directory and keeping the tab open (might be a good idea since in my IDE sources are NOT imported so I see no documentation)
  • Scala 3 macros documentation

    • Additionally I suggest opening code in a browser API directory and keeping the tab open (might be a good idea since in my IDE sources are NOT imported so I see no documentation)

Cross-Building Background

  • The State of TASTy Reader — an article examining the current capabilities and limitations of Scala 3's TASTy reader when consuming Scala 2.13 artifacts, and what it means for cross-compilation strategies.

EPFL Papers

For the story of how the Scala macro ecosystem evolved and which projects influenced Hearth's design, see Prior Art & Influences.