Uni

One Scala 3 library for the whole stack. Uni gives you object wiring (Design), logging, JSON/MessagePack, Rx, HTTP client/server, RPC, MCP servers, Parquet and Iceberg tables on object storage, and testing from one project, with minimal dependencies, and the same code runs on JVM, Scala.js, and Scala Native. It is the Scala 3 successor of Airframe.
Documentation
https://wvlet.org/uni/
For AI coding agents: read llms.txt (page index) or
llms-full.txt (all docs in one file), and see
Uni for AI Agents for canonical imports and an Airframe migration table.
Already using the Scala Toolkit? See
Uni and the Scala Toolkit for when each fits and how
they work together.
Runnable example apps, compiled and tested in CI, live in examples/: a CLI tool
(JVM and Scala Native), a REST + RPC server, a stdio MCP server, and Scala.js UIs. Copy one as a
starting point.
Claude Code users can install the Uni skill, which teaches the agent idiomatic Uni code:
/plugin marketplace add wvlet/uni
/plugin install uni@uni
Uni and Airframe
Uni is the Scala 3 successor of Airframe. The two projects have different goals:
- Uni supports only Scala 3. Dropping Scala 2 lets it make full use of Scala 3 features in its APIs and implementation. It also bundles the core utilities into a few modules (
uni, uni-netty, uni-test) instead of many airframe-* artifacts.
- Airframe supports both Scala 2 and Scala 3, and it remains maintained. There is no plan to deprecate it.
For a new Scala 3 project, use Uni. If your project still needs Scala 2, or you depend on Airframe modules that Uni doesn't cover, keep using Airframe.
See the Airframe migration table for how APIs map between them.
Modules
| Module | Description |
|---|
uni | Core utilities: Design (object wiring), logging, JSON, MessagePack, Rx, HTTP client and server, RPC, control flow, and cloud data: S3, GCS, and Azure Blob objects, Apache Parquet, Iceberg, and Delta Lake tables, and Arrow IPC, all in pure Scala |
uni-netty | Optional Netty backend for the HTTP server (JVM only) |
uni-test | Lightweight testing framework with cross-platform support |
uni and uni-test are cross-platform: JVM, Scala.js, and Scala Native.
Getting Started
Add the dependencies you need to your build.sbt, replacing <version>
with a Uni version. Every release is published to the wvlet Maven
repository, https://repo.wvlet.org/maven2, and only some are copied to
Maven Central. The version on the Maven Central badge above needs no
extra setup; for a newer release, add the wvlet resolver:
// Only for a version newer than the Maven Central badge
resolvers += "wvlet" at "https://repo.wvlet.org/maven2"
// Core utilities (Design, logging, JSON, MessagePack, Rx, HTTP client and server, RPC, etc.)
libraryDependencies += "org.wvlet.uni" %% "uni" % "<version>"
// Testing framework
libraryDependencies += "org.wvlet.uni" %% "uni-test" % "<version>" % Test
testFrameworks += new TestFramework("wvlet.uni.test.Framework")
On sbt 1.x, use %%% for uni and uni-test in Scala.js or Scala
Native projects (sbt 2.x uses %% for all platforms):
libraryDependencies += "org.wvlet.uni" %%% "uni" % "<version>"
libraryDependencies += "org.wvlet.uni" %%% "uni-test" % "<version>" % Test
See The wvlet Maven Repository
for scala-cli, Mill, and Gradle setup, and for why a library published to
Maven Central should depend only on Uni versions that are on Maven Central.
Using uni
A minimal example using the logging API:
import wvlet.uni.log.LogSupport
class MyService extends LogSupport:
def greet(name: String): String =
info(s"Greeting ${name}")
s"Hello, ${name}!"
@main def hello =
val service = MyService()
println(service.greet("World"))
See the reference docs for Design, Rx,
JSON/MessagePack, HTTP, and more.
Running an HTTP server