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 |
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)¶
Merged pull requests:
Scala Native Compiler Plugin¶
[nscplugin] Fix support for -Yfuture-lazy-vals in Scala 3.3.8 #4873 (WojciechMazur)
Scala Native Runtime¶
[Immix/Commit GC] Improvements towards stability of trap-based GC yieldpoints #4875 (WojciechMazur)
[Commix GC] Fix crash when marking large ref arrays #4891 (WojciechMazur)
[feature]: Experimental VirtualThreads support #4793 (WojciechMazur)
[nativelib] Remove usage of deprecated ATOMIC_VAR_INIT #4888 (WojciechMazur)
[runtime] Fix continuations under release mode #4907 (WojciechMazur)
[runtime] Preserve rlimit-derived main-thread maxStackSize on Linux #4908 (arashi01)
Scala Native Toolchain¶
Fix service providers table alignment with
NoProviders#4894 (lolgab)Optimize BinaryDeserializer.getString() to not allocate intermediate array #4833 (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] Remove redundant
bitcast ptr %x to ptrwith opaque pointers #4835 (lolgab)[interflow] Cache
obj.getClassacross poly-inline type switches #4834 (lolgab)tools: Exclude
/CONTRIBUTINGfrom embedded resources by default #4899 (kubukoz)
Scala Native sbt Plugin¶
[sbt 2.x] Cache nativeConfig tasks #4883 (WojciechMazur)
[sbt-plugin] Make
nativeConfigscoped tonativeLinkvariant #4885 (WojciechMazur)[sbt-plugin] Deprecate JDK older then 17 #4896 (WojciechMazur)
[sbt-plugin] Deprecate LLVM older then 16 #4898 (WojciechMazur)
Java Standard Library¶
[javalib] Add
SubmissionPublisherunderjava.util.concurrentto 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)
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)
Fix #4880: Do not run FilesTest#filesGetLastModifiedTimeUsesMilliseconds on JVM with JDK 8 #4881 (LeeTibbert)
Fix
ClassLoader#getResourceAsStreamJVM 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)
Saturate FileTime conversions after day overflow #4858 (He-Pin)