FS2 is a library for purely functional, effectful, and polymorphic stream processing library in the Scala programming language. Its design goals are compositionality, expressiveness, resource safety, and speed. The name is a modified acronym for Functional Streams for Scala (FSS, or FS2).
FS2 is available for Scala 2.12, Scala 2.13, Scala 3, and Scala.js and Scala Native.
FS2 is built upon two major functional libraries for Scala, Cats, and Cats-Effect.
Regardless of those dependencies, FS2 core types (streams and pulls) are polymorphic in the effect type (as long as it is compatible with
and thus FS2 can be used with other effect libraries, such as Monix.
iolibrary provides FS2 bindings for NIO-based file I/O and TCP/UDP networking.
You can find a list of libraries and integrations with data stores built on top of FS2 here: https://fs2.io/#/ecosystem.
If you have a project you'd like to include in this list, please open a PR or let us know in the Discord channel and we'll add a link to it.
Special thanks to YourKit for supporting this project's ongoing performance tuning efforts with licenses to their excellent product.
See the Code of Conduct.