The ZIO Way
Fibers, not threads β parallelism is one combinator, and interruption is handled for you.
- Fibers are lightweight β run thousands concurrently, not OS threads.
- Work runs in parallel; if one part fails, the rest are interrupted.
- The same safety holds for one task or a whole collection.
1val users = fetchUsers.retry(Schedule.recurs(3))2val orders = fetchOrders.timeout(2.seconds)3
4// Run both in parallel; if one fails, the other is interrupted5val both = users.zipPar(orders)6
7// Or a whole collection at once8val profiles = ZIO.foreachPar(userIds)(fetchProfile)Features
High-performance
Build scalable applications with minimal runtime overhead
Type-safe
Use the full power of the Scala compiler to catch bugs at compile time
Concurrent
Easily build concurrent apps without deadlocks, race conditions, or complexity
Asynchronous
Write sequential code that looks the same whether itβs asynchronous or synchronous
Resource-safe
Build apps that never leak resources (including threads!), even when they fail
Testable
Inject test services into your app for fast, deterministic, and type-safe testing
Resilient
Build apps that never lose errors, and which respond to failure locally and flexibly
Functional
Rapidly compose solutions to complex problems from simple building blocks
Ecosystem
A rich ecosystem of libraries built on ZIO to solve real-world problems
ZIO Blocks
Modular, zero-dependency building blocks for modern Scala applications
- Type-safe schemas with automatic codec derivation
- Zero lock-in β no dependency on ZIO or any effect system
- Works with any Scala stack: ZIO, Cats Effect, Kyo, Ox, Akka, or plain Scala
- Modular β import only the blocks you need
- Full cross-platform support for JVM and Scala.js
- Full cross-version support for Scala 2.13 and Scala 3.x
- High-performance implementations avoiding boxing and unnecessary allocations
- Includes Schema, Chunk, Scope, Docs, TypeId, Context, MediaType, and Ring Buffer blocks

ZIO HTTP
Type-safe, purely functional HTTP library for high-performance web apps and APIs
- High-performance server based on Netty
- Type-safe and type-driven endpoints
- WebSocket support for real-time applications
- Middleware system for cross-cutting concerns
ZIO Streams
Powerful, composable, and type-safe streaming library for working with large or infinite data
- Process infinite streams with finite memory resource
- Automatic backpressure handling
- Rich set of stream combinators
- Non-blocking and asynchronous processing
ZIO Test
Feature-rich testing framework with powerful assertions and property-based testing
- Property-based testing out of the box
- Deterministic testing of concurrent code
- Test aspects for reusable configurations
- Integration with JUnit and other frameworks
ZIO STM
Software Transactional Memory for safe, composable concurrent programming
- Atomic, isolated transactions
- Composable concurrent operations
- No deadlocks or race conditions
- Automatic retry of interrupted transactions
ZIO Schema
Declarative schema definitions for data structures with automatic derivation
- Reification of data structures
- Manual and automatic schema derivation
- Built-in codecs for JSON, Protobuf, Avro, and Thrift
- Schema transformations and migrations
ZIO Config
Type-safe, composable configuration management with automatic documentation
- Type-safe configuration descriptions
- Multiple source support (files, env vars)
- Automatic documentation generation
- Validation with detailed error reporting
ZIO Logging
High-performance, structured logging with contextual information
- Structured logging for ZIO applications
- Multiple backend support (SLF4J, JPL, Console)
- Context-aware logging with MDC support
- Log correlation across async boundaries
ZIO JSON
Fast, secure JSON library with tight ZIO integration
- High-performance parsing and encoding
- Hardened against adversarial JSON payloads
- Automatic derivation, no shapeless required
- Human- and machine-readable error messages
ZIO Kafka
A purely functional, streams-based client for Apache Kafka
- High-level streaming API on top of the Java Kafka client
- Higher throughput than the Java client in most workloads
- Parallel per-partition consumption
- Custom serialization and deserialization support
Learn ZIO with Zionomicon
The comprehensive guide to building scalable applications with ZIO
Zionomicon stands as the comprehensive guide to mastering ZIOβthe game-changing library that's revolutionizing how developers build robust Scala applications. It takes you from the fundamentals to advanced topics, teaching you how to build concurrent, resilient, and testable applications.
In Zionomicon, you'll master:
- Modeling complex business logic using ZIO's effect system
- Error handling and resource management with ZIO
- Concurrent and asynchronous programming patterns
- Building predictable and testable applications
- Structured dependency injection using ZIO's layer system
- And much more to explore!
