# Uni > One Scala 3 library for the whole stack, on JVM, Scala.js, and Scala Native Uni is the Scala 3 successor of Airframe: object wiring, logging, JSON/MessagePack, Rx, HTTP, RPC, MCP servers, and testing with minimal dependencies, on JVM, Scala.js, and Scala Native. Start with /uni/guide/for-ai-agents.md for canonical imports, an Airframe migration table, and common mistakes. ## Table of Contents ### The Uni Book - [The Uni Book](https://wvlet.org/uni/book.md) - [Foreword](https://wvlet.org/uni/book/foreword.md) ### Part I — Getting Started - [1. Getting Started](https://wvlet.org/uni/book/ch01-00-getting-started.md) - [1.1 Installation](https://wvlet.org/uni/book/ch01-01-installation.md) - [1.2 Hello, Uni!](https://wvlet.org/uni/book/ch01-02-hello-uni.md) ### Part II — Building a CLI Application - [2. A URL Fetcher](https://wvlet.org/uni/book/ch02-00-cli-app.md) ### Part III — Core Concepts - [3. Wiring with Design](https://wvlet.org/uni/book/ch03-00-design.md) - [4. Testing with UniTest](https://wvlet.org/uni/book/ch04-00-testing.md) - [5. Logging That Finds You](https://wvlet.org/uni/book/ch05-00-logging.md) - [6. Data In, Data Out — JSON & MessagePack](https://wvlet.org/uni/book/ch06-00-data.md) ### Part IV — Async & Control Flow - [7. Rx, the Composable Stream](https://wvlet.org/uni/book/ch07-00-rx.md) - [8. Living With Failure — Retry, Circuit Breakers, Resources](https://wvlet.org/uni/book/ch08-00-control.md) ### Part V — HTTP & RPC - [9. HTTP Clients and Servers](https://wvlet.org/uni/book/ch09-00-http.md) - [10. Typed RPC](https://wvlet.org/uni/book/ch10-00-rpc.md) ### Part VI — Cross-Platform - [11. One Codebase, Three Runtimes](https://wvlet.org/uni/book/ch11-00-cross-platform.md) ### Part VII — Scala.js & the JS Ecosystem - [12. Calling NPM Modules from Scala.js](https://wvlet.org/uni/book/ch12-00-npm-facades.md) - [13. Bundling with Vite](https://wvlet.org/uni/book/ch13-00-vite.md) ### Part VIII — Scala Native & the C/Rust World - [14. Calling C from Scala Native](https://wvlet.org/uni/book/ch14-00-calling-c.md) - [15. Exposing Scala Native to C and Rust](https://wvlet.org/uni/book/ch15-00-exposing-native.md) ### Part IX — Capstone - [16. Capstone — A Bookmarks Service](https://wvlet.org/uni/book/ch16-00-capstone.md) ### Appendices - [Appendix A: Scala 3 Syntax Notes for This Book](https://wvlet.org/uni/book/appendix-a-scala3.md) - [Appendix B: Uni and Airframe — History and Relationship](https://wvlet.org/uni/book/appendix-b-airframe.md) - [Appendix C: Glossary](https://wvlet.org/uni/book/appendix-c-glossary.md) ### Getting Started - [Introduction](https://wvlet.org/uni/guide.md) - [Installation](https://wvlet.org/uni/guide/installation.md) - [Design Principles](https://wvlet.org/uni/guide/principles.md) - [Uni for AI Agents](https://wvlet.org/uni/guide/for-ai-agents.md): How AI coding agents should pick and use Uni, the Scala 3 utility library for object wiring (Design), logging, JSON/MessagePack, HTTP, RPC, MCP servers, and testing on JVM, Scala.js, and Scala Native. - [Uni and the Scala Toolkit](https://wvlet.org/uni/guide/uni-vs-scala-toolkit.md): Scala Toolkit or Uni? When to choose the official Scala starter kit (sttp, uPickle, os-lib, MUnit), when to add Uni (object wiring, logging, HTTP server, RPC, MCP servers, and testing on JVM, Scala.js, and Scala Native), and how to use them together, with a feature table, side-by-side code, and an FAQ. ### Core - [Core Utilities](https://wvlet.org/uni/core.md) - [Design](https://wvlet.org/uni/core/design.md) - [UniTest](https://wvlet.org/uni/core/unitest.md) - [Logging](https://wvlet.org/uni/core/logging.md) - [JSON Processing](https://wvlet.org/uni/core/json.md) - [MessagePack Serialization](https://wvlet.org/uni/core/msgpack.md) - [Weaver](https://wvlet.org/uni/core/weaver.md) - [Type Introspection](https://wvlet.org/uni/core/surface.md) - [IO](https://wvlet.org/uni/core/io.md) - [Canvas (Off-Heap Memory)](https://wvlet.org/uni/core/canvas.md) - [FileSystem](https://wvlet.org/uni/core/filesystem.md) - [SettingStore](https://wvlet.org/uni/core/settings.md) - [Result](https://wvlet.org/uni/core/result.md) - [Utilities](https://wvlet.org/uni/core/utilities.md) ### Text Formats - [Text Formats](https://wvlet.org/uni/text.md) - [JSON Processing](https://wvlet.org/uni/core/json.md) - [YAML](https://wvlet.org/uni/text/yaml.md) - [Markdown](https://wvlet.org/uni/text/markdown.md) - [Cron](https://wvlet.org/uni/text/cron.md) ### Control Flow - [Control Flow](https://wvlet.org/uni/control.md) - [Retry Logic](https://wvlet.org/uni/control/retry.md) - [Circuit Breaker](https://wvlet.org/uni/control/circuit-breaker.md) - [Rate Limiter](https://wvlet.org/uni/control/rate-limiter.md) - [Caching](https://wvlet.org/uni/control/cache.md) - [Resource Management](https://wvlet.org/uni/control/resource.md) - [Background Task](https://wvlet.org/uni/control/background-task.md) ### HTTP - [HTTP Framework](https://wvlet.org/uni/http.md) - [HTTP Client](https://wvlet.org/uni/http/client.md) - [REST Server](https://wvlet.org/uni/http/server.md) - [Router](https://wvlet.org/uni/http/router.md) - [RPC](https://wvlet.org/uni/http/rpc.md) - [OpenAPI](https://wvlet.org/uni/http/openapi.md) - [Server-Sent Events](https://wvlet.org/uni/http/sse.md) - [WebSocket Client](https://wvlet.org/uni/http/websocket.md) - [HTTP Retry Strategies](https://wvlet.org/uni/http/retry.md) ### MCP - [Build Your Own MCP Server (stdio)](https://wvlet.org/uni/mcp.md) ### Reactive Streams - [Reactive Streams](https://wvlet.org/uni/rx.md) - [Rx Basics](https://wvlet.org/uni/rx/basics.md) - [Stream Operators](https://wvlet.org/uni/rx/operators.md) - [Rx Concurrency](https://wvlet.org/uni/rx/concurrency.md) ### CLI - [CLI Utilities](https://wvlet.org/uni/cli.md) - [Terminal Styling](https://wvlet.org/uni/cli/tint.md) - [Progress Indicators](https://wvlet.org/uni/cli/progress.md) - [Line Editing](https://wvlet.org/uni/cli/line-reader.md) - [Command Launcher](https://wvlet.org/uni/cli/launcher.md) ### Web UI (Scala.js) - [Web UI](https://wvlet.org/uni/dom.md): Build browser and desktop UIs in Scala.js with uni-dom (reactive HTML components driven by Rx) and uni-ui (ready-made, accessible components styled by one CSS file). - [RxElement & HTML DSL](https://wvlet.org/uni/dom/rxelement.md): Write reactive browser components in Scala.js with RxElement and uni-dom's type-checked HTML/SVG DSL, keyed lists, two-way form binding, and reactive wrappers over browser APIs. - [Components](https://wvlet.org/uni/dom/ui.md): uni-ui's components for Scala.js apps — controls, overlays, virtualized collections, and a dock — with ARIA, keyboard handling, and styling by CSS variables. - [Controls](https://wvlet.org/uni/dom/controls.md): uni-ui controls for Scala.js — Button, IconButton, Input, Textarea, tabs, badges, and key caps — bound to Rx variables. - [Overlays](https://wvlet.org/uni/dom/overlays.md): uni-ui overlays for Scala.js — popovers, tooltips, menus, context menus, dialogs, selects, and toasts — with focus handling, Escape stacking, and flip-and-shift placement. - [Collections](https://wvlet.org/uni/dom/collections.md): uni-ui collections for Scala.js — virtualized VirtualList, Tree, and DataTable with keyboard navigation, multi-select, and drag or keyboard reordering, plus a fuzzy-search CommandPalette. - [Layout & Dock](https://wvlet.org/uni/dom/layout.md): Lay out a Scala.js app with uni-ui — resizable foldable side panes, splitters, a status bar, and a Dock of tab groups and splits that the user rearranges and the app saves as JSON. - [Behaviors](https://wvlet.org/uni/dom/behaviors.md): Build your own accessible Scala.js widgets from the interaction logic uni-ui components are made of — roving focus, typeahead, selection, reordering, stick-to-bottom scrolling, and announcements. - [Changes & Parts](https://wvlet.org/uni/dom/changes.md): See and cancel every change a uni-ui component makes with onChange, tell a pointer, key, program, or AI agent apart with ChangeSource and ChangeCause, and target component parts by data-slot. - [Agents](https://wvlet.org/uni/dom/agents.md): Let an AI agent read and operate a uni-ui screen without screenshots — UiAgent snapshots, actions, permissions, and confirmations, served as MCP tools, WebMCP, or from an Electron app. - [Theming](https://wvlet.org/uni/dom/theming.md): Theme uni-ui with light and dark color schemes and --uni-* CSS variables, without touching Scala code. - [Testing](https://wvlet.org/uni/dom/testing.md): Test Scala.js UI components in a real browser with uni-test's DomTestSupport — mount, query, fireEvent, wait for onMount — and check widgets against WAI-ARIA patterns with checkPattern. - [Desktop Apps (Electron)](https://wvlet.org/uni/http/electron.md) - [Electron Tutorial: Setup from Scratch](https://wvlet.org/uni/http/electron-tutorial.md) ### Build Tooling - [sbt-uni Plugin](https://wvlet.org/uni/build/sbt-uni.md) - [sbt-uni-playwright Plugin](https://wvlet.org/uni/build/sbt-uni-playwright.md) - [sbt-uni-crossproject Plugin](https://wvlet.org/uni/build/sbt-uni-crossproject.md) - [sbt-uni-javadoc Plugin](https://wvlet.org/uni/build/sbt-uni-javadoc.md) ### Blog - [Introducing Uni: One Scala 3 Library for the Whole App](https://wvlet.org/uni/blog/introducing-uni.md): Uni is one Scala 3 library with one set of conventions for object wiring, logging, object serialization (JSON and MessagePack), HTTP, typed RPC, MCP servers, Rx, CLI tools, and testing, on the JVM, Scala.js, and Scala Native. It is the Scala 3 successor of Airframe and is built to be read by AI coding agents as well as people. ### Other - [Uni - One Scala 3 Library for the Whole Stack](https://wvlet.org/uni/index.md): Uni is the Scala 3 successor of Airframe: object wiring, logging, JSON/MessagePack, Rx, HTTP, RPC, MCP servers, and testing with minimal dependencies, on JVM, Scala.js, and Scala Native. - [Uni Walkthrough](https://wvlet.org/uni/uni-walkthrough.md) - [uni-rx Concurrency Design Note](https://wvlet.org/uni/design/rx-concurrency.md)