Usage in SBT
Older versions: 2.x
The packages are published on Maven Central, cross-compiled for Scala 2.12, 2.13 and 3.0, also cross-compiled to Scala.js 1.x:
- Current 3.x release:
3.4.0
(download source archive)
These install instructions are for Scala’s SBT (see the setup instructions). Also see versioning scheme for backwards-compatibility guarantees.
Everything in Monix #
The main monix
project contains everything in the Monix core.
Insert this line in build.sbt
or Build.scala
:
// for the JVM
libraryDependencies += "io.monix" %% "monix" % "3.4.0"
Monix is cross-compiled with Scala.js, so to target Javascript or mixed JVM/Javascript environments:
// for Scala.js/Javascript or cross-compilation
libraryDependencies += "io.monix" %%% "monix" % "3.4.0"
Depends on:
- cats
- cats-effect
- jctools (shaded)
- reactive-streams-jvm
- monix-execution
- monix-catnap
- monix-eval
- monix-reactive
- monix-tail
Sub-modules & Dependencies graph #
Sub-project: monix-execution #
You can use just monix-execution
, the lower level primitives for dealing
with asynchronous execution, thus exposing
Scheduler and
Cancelable.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-execution" % "3.4.0"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-execution" % "3.4.0"
Depends on:
- jctools (shaded)
- reactive-streams-jvm
- implicitbox
Sub-project: monix-catnap #
You can use just monix-catnap
(see API Docs), the high-level primitives building on top of Cats Effect.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-catnap" % "3.4.0"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-catnap" % "3.4.0"
Depends on:
Sub-project: monix-eval #
You can use just monix-eval
, the sub-project that exposes
Task and
Coeval:
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-eval" % "3.4.0"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-eval" % "3.4.0"
Depends on:
Sub-project: monix-reactive #
You can use just monix-reactive
, the sub-project that exposes
the Observable pattern.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-reactive" % "3.4.0"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-reactive" % "3.4.0"
Depends on:
Sub-project: monix-tail #
You can use just monix-tail
, the sub-project that exposes
Iterant for pull based
streaming.
// Targeting just the JVM
libraryDependencies += "io.monix" %% "monix-tail" % "3.4.0"
// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-tail" % "3.4.0"
Depends on: