Skip to content

UniOne Scala 3 library for the whole stack

Essential building blocks for Scala 3 applications, with minimal dependencies and one codebase for the JVM, Scala.js, and Scala Native.

Uni

What is Uni? ​

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.

Install ​

scala
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"
scala
//> using dep org.wvlet.uni::uni:2026.1.39

Example: Design, logging, and JSON ​

scala
import 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!"}
  }

Why one library? ​

  • Minimal dependencies. On the JVM, 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.
  • One version to upgrade. Object wiring, logging, codecs, HTTP, and tests are released together, so they never disagree on transitive dependencies.
  • One codebase on three platforms. The same code runs on the JVM, in Node.js or the browser, and as a Scala Native binary.
  • One set of conventions. Case classes become JSON, RPC payloads, and MCP tool arguments through the same 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.

Used by Wvlet ​

Wvlet, a flow-style query language and its CLI and server, is built on uni, uni-test, and uni-netty.

For AI agents ​

  • llms.txt (page index) and llms-full.txt (all docs in one file)
  • Uni for AI Agents: canonical imports, an Airframe migration table, and common mistakes
  • Context7
  • Claude Code plugin: /plugin marketplace add wvlet/uni, then /plugin install uni@uni

Modules ​

ModuleContentsPlatforms
uniDesign, 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-nettyNetty HTTP server, annotation router, HTTP RPC serverJVM
uni-testUniTest frameworkJVM, Scala.js, Scala Native

Released under the Apache 2.0 License.