Cats-Actors 2.1.0 - now cross-platform on JVM, Scala Native, and Scala.js

Hi folks,

Just released Cats-Actors 2.1.0 - a typed actor library built on Cats Effect that now runs cross-platform on JVM, Scala Native, and Scala.js.

The release takes full advantage of the multithreading support introduced in Cats Effect 3.7.0 on Scala Native 0.5. Under the hood we use platform-specific mailbox implementations - LinkedTransferQueue on JVM and cats.effect.std.Queue on JS/Native - behind a shared interface, so actor code stays identical across all three targets.

To showcase what this unlocks we put together two samples:

  • A ring benchmark comparing throughput and startup time across JVM and Native, with JMH benchmarks

  • A browser demo - actors compiled to Scala.js with Slinky React, running live in the browser

Blog post with full walkthrough and live demo: https://cloudmark.github.io/Cats-Actors-Native-And-JS/

GitHub: https://github.com/cloudmark/cats-actors

Big thanks to @rlavoleerlavolee and @Voltir for the cross-platform work. Happy to answer any questions!

3 Likes