Usage in SBT

The packages are published on Maven Central, cross-compiled for Scala 2.10, 2.11 and 2.12, also cross-compiled to Scala.js 0.6.13:

These install instructions are for Scala’s SBT (see the setup instructions) and for Apache Maven build tools.

Everything in Monix Core

The main monix project contains everything in the Monix core, cross-compiled for:

Depends on:

To use with insert the dependency in your build.sbt or Build.scala:

// for the JVM
libraryDependencies += "io.monix" %% "monix" % "2.2.2"

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" % "2.2.2"

Sub-project: monix-types

The monix-types subproject is like a kernel exposing Monix’s type-classes that are used for integration with Cats or other libraries. For the moment this means shims for types such as Monad, MonadError or Comonad, or Evaluable, a type-class meant to abstract over both Task or Coeval.

Usage:

Has no dependencies.

// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-types" % "2.2.2"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-types" % "2.2.2"

Sub-project: monix-execution

You can use just monix-execution, the lower level primitives for dealing with asynchronous execution, thus exposing Scheduler and Cancelable:

Depends on Sincron.

// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-execution" % "2.2.2"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-execution" % "2.2.2"

Sub-project: monix-eval

You can use just monix-eval, the sub-project that exposes Task and Coeval:

Depends on:

// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-eval" % "2.2.2"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-eval" % "2.2.2"

Sub-project: monix-reactive

You can use just monix-reactive, the sub-project that exposes the Observable pattern:

Depends on:

// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-reactive" % "2.2.2"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-reactive" % "2.2.2"

Sub-project: monix-cats (Optional)

The monix-cats optional sub-projects is the integration with the Cats library.

To import:

Depends just on monix-types.

// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-cats" % "2.2.2"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-cats" % "2.2.2"

Sub-project: monix-scalaz-72 (Optional)

The monix-scalaz-72 optional sub-projects is the integration with the Scalaz library.

To import:

Depends just on monix-types.

// Targetting just the JVM
libraryDependencies += "io.monix" %% "monix-scalaz-72" % "2.2.2"

// For Scala.js or cross-compiled projects
libraryDependencies += "io.monix" %%% "monix-scalaz-72" % "2.2.2"