Cross-Platform
Write it once and run it on the JVM, in Node.js or the browser, or as a Scala Native binary.
Essential building blocks for Scala 3 applications, with minimal dependencies and one codebase for the JVM, Scala.js, and Scala Native.
Write it once and run it on the JVM, in Node.js or the browser, or as a Scala Native binary.
Design connects your services through their constructors and manages their lifecycles, so your classes stay plain Scala.
LogSupport adds info/debug/warn with source locations to any class.
Add derives Weaver to a case class to get JSON and MessagePack codecs.
Composable reactive streams and variables for async code and UI state.
Sync and async clients with automatic retry, streaming, Server-Sent Events, and WebSocket.
Serve REST endpoints, and define RPC services as Scala traits with type-safe clients.
Turn a Scala trait into an MCP server whose methods AI agents can call as tools.
A lightweight test framework with shouldBe-style assertions.
Uni is a Scala 3 library that gives you object wiring (Design), logging, JSON/MessagePack, Rx, HTTP client/server, RPC, MCP servers, 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, for people who build services, CLIs, and tools in Scala 3 and want one consistent set of conventions across these concerns.
libraryDependencies += "org.wvlet.uni" %% "uni" % "2026.1.39"
// Testing
libraryDependencies += "org.wvlet.uni" %% "uni-test" % "2026.1.39" % Test
testFrameworks += new TestFramework("wvlet.uni.test.Framework")
// Netty HTTP server (JVM only)
libraryDependencies += "org.wvlet.uni" %% "uni-netty" % "2026.1.39"//> using dep org.wvlet.uni::uni:2026.1.39import wvlet.uni.design.Design
import wvlet.uni.log.LogSupport
import wvlet.uni.weaver.Weaver
case class Greeting(name: String, message: String) derives Weaver
class Greeter extends LogSupport:
def greet(name: String): String =
info(s"Greeting ${name}")
Weaver.toJson(Greeting(name, s"Hello, ${name}!"))
@main def hello =
Design.newDesign.bindSingleton[Greeter].build[Greeter] { greeter =>
println(greeter.greet("Uni")) // {"name":"Uni","message":"Hello, Uni!"}
}uni depends only on the Scala 3 standard library. Scala.js and Scala Native add only the platform shims they need, such as java.time support.Weaver codecs.Focused libraries and ecosystems such as sttp, circe, ZIO, and MacWire are good choices, and if they already serve you well there is no need to switch. Uni fits best when you want these pieces from one place, especially when targeting Scala.js or Scala Native.
Wvlet, a flow-style query language and its CLI and server, is built on uni, uni-test, and uni-netty.
llms.txt (page index) and llms-full.txt (all docs in one file)/plugin marketplace add wvlet/uni, then /plugin install uni@uni| Module | Contents | Platforms |
|---|---|---|
uni | Design, logging, JSON/MessagePack, Rx, HTTP client, Node.js/Native HTTP servers, RPC, MCP, CLI utilities, Web UI (Scala.js) | JVM, Scala.js, Scala Native |
uni-netty | Netty HTTP server, annotation router, HTTP RPC server | JVM |
uni-test | UniTest framework | JVM, Scala.js, Scala Native |