ZIO is a zero-dependency Scala library for asynchronous and concurrent programs. It uses fibers for scheduling and emphasizes type safety, resource safety, and testability.
Overview
ZIO targets Scala developers building concurrent and asynchronous applications. Programs are expressed as typed effects composed with combinators, backed by scalable, non-blocking fibers. The library aims to let sequential code read similarly whether work is sync or async.
Strengths include compile-time safety through Scala’s type system, structured error handling, resource scopes that release on failure, and dependency injection patterns for tests. Ecosystem libraries built on ZIO cover HTTP, streams, testing, software transactional memory, schemas, configuration, logging, JSON, and Kafka clients, with cross-platform JVM and Scala.js support.
ZIO is used in production by several companies. Community support includes Discord, homepage documentation, and the Zionomicon book for learning effect modeling, concurrency patterns, and layers. Sponsors contribute to tracing and maintenance efforts.
The core library offers functional building blocks for resilient applications that retain errors and respond to failures locally rather than losing them silently.
Key features
- Fiber-based concurrency
- Typed effect composition
- Resource-safe scopes
- Testable dependency injection
- Structured error handling
- Zero core dependencies
- Ecosystem HTTP and streams libs
- Property and concurrent testing support
Use cases
- Concurrent Scala services
- Type-safe async business logic
- Streaming and Kafka pipelines
- Deterministic effect testing