0.5.12 (2026-05-22)

We’re happy to announce the release of Scala Native 0.5.12

Highlights of the release

Experimental virtual threads (#4793)

Scala Native now ships an experimental implementation of Java Virtual Threads on Unix (Linux and macOS on x86_64 and aarch64). The work revives long-running scheduling support for lightweight threads; it covers thread scheduling and carrier integration, not the full scoped-concurrency API surface. Windows is not supported yet (stable continuations are still missing there).

Because virtual threads rely on Continuations API, they are aimed primarily at Scala 3 projects (Scala 2 lacks the continuations API). We recommend LLVM 16 or newer; older LLVM versions (14/15) are known to produce broken continuation state at runtime.

This feature is not production-ready: treat it as a preview for early adopters and tests. In particular, link-time optimization (LTO) builds are known to fail when virtual threads are enabled—use a non-LTO release mode until that limitation is resolved.

GC reliability in release builds (#4875)

Some release builds (release-fast, release-full) with Immix or Commix and multiple threads could crash or hang: the runtime reported that threads did not reach a safepoint and collection could not continue (#4826, #4871). The same applications often ran fine in debug mode, which made the issue hard to notice during normal development.

#4875 fixes this long-standing problem for typical multithreaded release workloads. If you still see similar GC sync timeouts while investigating, you can rebuild with SCALANATIVE_GC_TRAP_BASED_YIELDPOINTS=0 as a workaround (see Debugging with multithreading).

Deprecated JDK and LLVM versions (#4896, #4898)

Starting with 0.5.12, the sbt plugin warns when your toolchain is older than what we routinely test in CI:

Component

Tested from

Older versions

JDK (running sbt / tests)

17

Still accepted, but deprecated

LLVM/Clang (native link)

16

Still accepted down to the existing minimum (6), but deprecated

These are deprecations, not hard requirements: builds with JDK 8–16 or LLVM/Clang 6–15 can still run, but they are no longer part of our test matrix and may hit problems we will not chase on those versions.

Why upgrade LLVM: besides general maintenance, LLVM 14 and 15 are known to break continuations used by experimental virtual threads (see above)—the same code works with LLVM 16+. We recommend using a current LLVM release (22 is used in much of our CI today).

Why upgrade JDK: Scala 3 requires JDK 17 to run, and dropping JDK 8 from our CI matrix lets us reduce maintenance overhead (fewer JDK-specific test paths and JVM quirks to support). CI and contributor workflows for Scala Native now assume JDK 17+ for building and testing. Published libraries still target older Java bytecode levels where required; this change affects the JDK you use to run sbt, not the Java API level of your Native binary.

You will see a one-time warning during nativeLink / nativeConfig discovery when a deprecated version is detected. Plan to move to JDK 17+ and LLVM/Clang 16+ before support for older toolchains is removed in a future release.

Supported Scala versions

Scala Binary Version

Supported Scala Versions

2.12

2.12.17 … 2.12.21

2.13

2.13.9 … 2.13.18

3

3.1.2 … 3.1.3
3.2.0 … 3.2.2
3.3.0 … 3.3.7 LTS
3.4.0 … 3.4.3
3.5.0 … 3.5.2
3.6.2 … 3.6.4
3.7.0 … 3.7.4
3.8.0 … 3.8.3

Upon release of new Scala version (stable, or Scala 3 RC) version dependent artifacts would be published without a new release.

Commits since last release 47
Merged PRs 46
Contributors 9

Contributors

Big thanks to everybody who contributed to this release or reported an issue!

$ git shortlog -sn --no-merges v0.5.11..v0.5.12
 18	Wojciech Mazur
     8	LeeTibbert
     7	He-Pin(kerr)
     7	Lorenzo Gabriele
     2	Ali Rashid
     2	dependabot[bot]
     1	Jakub Kozłowski
     1	Lanqing Huang
     1	Takahiko Tominaga

Merged PRs

v0.5.12 (2026-05-22)

Full Changelog

Merged pull requests:

Scala Native Compiler Plugin

Scala Native Runtime

Scala Native Toolchain

  • Fix service providers table alignment with NoProviders #4894 (lolgab)

  • Optimize BinaryDeserializer.getString() to not allocate intermediate array #4833 (lolgab)

  • Optimize Attrs.fromSeq #4832 (lolgab)

  • [build] Enable Scala JVM backend optimizations of toolchain #4892 (WojciechMazur)

  • [codegen] Match clang’s PIC/PIE module flags in NIR-emitted IR #4904 (arashi01)

  • [codegen] Profile guided optimizations #4836 (lolgab)

  • [codegen] Remove redundant bitcast ptr %x to ptr with opaque pointers #4835 (lolgab)

  • [interflow] Cache obj.getClass across poly-inline type switches #4834 (lolgab)

  • tools: Exclude /CONTRIBUTING from embedded resources by default #4899 (kubukoz)

Scala Native sbt Plugin

Java Standard Library

  • [javalib] Add SubmissionPublisher under java.util.concurrent to support JSR 166 types #4762 (lqhuang)

  • Fix #4819: Use finer java.nio file times on non-Windows #4827 (LeeTibbert)

  • Fixed a bug where java.math.BigDecimal.toPlainString() returned an incorrect result by discarding the integer part #4840 (takapi327)

  • Fix #4841: Port JSR-166 concurrent.Exchanger class & tests #4870 (LeeTibbert)

  • Tighten ArrayList search and iterator bounds #4860 (He-Pin)

  • Validate PriorityQueue natural comparability #4865 (He-Pin)

  • Align AbstractQueue remove and element semantics #4859 (He-Pin)

  • Port Java JSR-166 StampedLock and its unit test #4839 (LeeTibbert)

  • Add juc.TimeUnit methods defined in Java {9, 11} and supporting internal-only testExt infrastructure #4876 (LeeTibbert)

  • Check Iterable.forEach action for null #4884 (He-Pin)

  • Fix #4880: Do not run FilesTest#filesGetLastModifiedTimeUsesMilliseconds on JVM with JDK 8 #4881 (LeeTibbert)

  • Fix ClassLoader#getResourceAsStream JVM compatibility #4901 (lolgab)

  • Fix #4897: implement javalib concurrent.LinkedBlockingDeque & its Test #4906 (LeeTibbert)

  • Fix #4872: Port java JSR-166 DelayQueue and implement JDK 21 remove() override #4889 (LeeTibbert)

  • Add Java 17 HexFormat #4911 (He-Pin)

  • Saturate FileTime conversions after day overflow #4858 (He-Pin)