The swave-akka-compat modules provides for very easy interconnectivity between swave and Akka-Stream.


See the Setup chapter for details on how to pull swave-akka-compat into your build.


Once you have swave-akka-compat on your classpath this import:

import swave.compat.akka._

gives you six “decorators” that allow for almost seamless conversion of all major stream graph components between both worlds. You can convert swave components into akka ones like this:

val akkaSource = spout.toAkkaSource
val akkaFlow = pipe.toAkkaFlow
val akkaSink = drain.toAkkaSink

as well as the other way around:

val spout = akkaSource.toSpout
val pipe = akkaFlow.toPipe 
val drain = akkaSink.toDrain

Additionally the import brings a Bytes[T] type class instance in scope that allows File IO to seamlessly work with akka.util.ByteString as the main vehicle for raw bytes. See the section on the Bytes type class for more info on this.

API Docs (ScalaDoc)

The ScalaDoc for swave-scodec-compat can be found >>> HERE <<<.