diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2013, Nikita Volkov
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/pipes-cereal-plus.cabal b/pipes-cereal-plus.cabal
new file mode 100644
--- /dev/null
+++ b/pipes-cereal-plus.cabal
@@ -0,0 +1,85 @@
+name:
+  pipes-cereal-plus
+version:
+  0.1.0
+synopsis:
+  Streaming serialization library on top of "pipes" and "cereal-plus".
+license:
+  MIT
+license-file:
+  LICENSE
+homepage:
+  https://github.com/nikita-volkov/pipes-cereal-plus 
+bug-reports:
+  https://github.com/nikita-volkov/pipes-cereal-plus/issues 
+author:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+copyright:
+  (c) 2013, Nikita Volkov
+category:
+  Serialization
+build-type:
+  Simple
+cabal-version:
+  >=1.10
+
+
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/nikita-volkov/pipes-cereal-plus.git
+
+
+library
+  hs-source-dirs:
+    src
+  exposed-modules:
+    PipesCerealPlus
+  other-modules:
+    PipesCerealPlus.Prelude
+  build-depends:
+    cereal-plus == 0.1.*,
+    pipes-bytestring,
+    pipes == 4.0.*,
+    errors,
+    text,
+    bytestring,
+    mtl,
+    base >= 4.5 && < 5
+  default-extensions:
+    Arrows
+    DeriveGeneric
+    ImpredicativeTypes
+    BangPatterns
+    PatternGuards
+    GADTs
+    StandaloneDeriving
+    MultiParamTypeClasses
+    ScopedTypeVariables
+    FlexibleInstances
+    TypeFamilies
+    TypeOperators
+    FlexibleContexts
+    NoImplicitPrelude
+    EmptyDataDecls
+    DataKinds
+    NoMonomorphismRestriction
+    RankNTypes
+    ConstraintKinds
+    DefaultSignatures
+    TupleSections
+    OverloadedStrings
+    TemplateHaskell
+    QuasiQuotes
+    DeriveDataTypeable
+    GeneralizedNewtypeDeriving
+    RecordWildCards
+    MultiWayIf
+    LiberalTypeSynonyms
+    LambdaCase
+  default-language:
+    Haskell2010
+
diff --git a/src/PipesCerealPlus.hs b/src/PipesCerealPlus.hs
new file mode 100644
--- /dev/null
+++ b/src/PipesCerealPlus.hs
@@ -0,0 +1,41 @@
+module PipesCerealPlus 
+  (
+    -- ** API for \"pipes\"
+    serializingProducer,
+    deserializingPipe,
+
+    -- ** Reexports of \"cereal-plus\" types
+    Serializable(..),
+    Serialize,
+    Deserialize,
+  )
+  where
+
+import PipesCerealPlus.Prelude
+import qualified CerealPlus.Serializable as Serializable
+import qualified CerealPlus.Serialize as Serialize
+import qualified CerealPlus.Deserialize as Deserialize
+import qualified Pipes.ByteString
+
+
+deserializingPipe :: 
+  (Monad m, Applicative m, Serializable a m) => 
+  Pipe ByteString a (EitherT Text m) ()
+deserializingPipe = 
+  await >>= processBS
+  where
+    processBS = liftRunPartial (Deserialize.runPartial Serializable.deserialize)
+      where
+        liftRunPartial runPartial = 
+          lift . lift . runPartial >=> \case
+            Deserialize.Fail m bs -> lift $ left $ m
+            Deserialize.Partial runPartial' -> await >>= liftRunPartial runPartial'
+            Deserialize.Done a bs -> yield a >> processBS bs
+
+serializingProducer :: 
+  (Monad m, Applicative m, Serializable a m) => 
+  a -> Producer ByteString m ()
+serializingProducer a = do
+  (r, bs) <- lift $ Serialize.runLazy $ Serializable.serialize a
+  Pipes.ByteString.fromLazy bs
+  return r
diff --git a/src/PipesCerealPlus/Prelude.hs b/src/PipesCerealPlus/Prelude.hs
new file mode 100644
--- /dev/null
+++ b/src/PipesCerealPlus/Prelude.hs
@@ -0,0 +1,92 @@
+module PipesCerealPlus.Prelude 
+  ( 
+    module Exports,
+    LazyByteString,
+    (?:),
+    traceM,
+    applyAll,
+    packText,
+    unpackText,
+  )
+  where
+
+-- base
+import Prelude as Exports hiding (concat, foldr, mapM_, sequence_, foldl1, maximum, minimum, product, sum, all, and, any, concatMap, elem, foldl, foldr1, notElem, or, mapM, sequence, FilePath, id, (.))
+import Control.Monad as Exports hiding (mapM_, sequence_, forM_, msum, mapM, sequence, forM)
+import Control.Applicative as Exports
+import Control.Arrow as Exports hiding (left, right)
+import Control.Category as Exports
+import Data.Monoid as Exports
+import Data.Foldable as Exports
+import Data.Traversable as Exports hiding (for)
+import Data.Maybe as Exports
+import Data.List as Exports hiding (concat, foldr, foldl1, maximum, minimum, product, sum, all, and, any, concatMap, elem, foldl, foldr1, notElem, or, find, maximumBy, minimumBy, mapAccumL, mapAccumR, foldl')
+import Data.Tuple as Exports
+import Data.Ord as Exports (Down(..))
+import Data.String as Exports
+import Data.Int as Exports
+import Data.Word as Exports
+import Data.Ratio as Exports
+import Data.Fixed as Exports
+import Data.Ix as Exports
+import Data.Data as Exports
+import Text.Read as Exports (readMaybe, readEither)
+import Control.Exception as Exports hiding (tryJust)
+import Control.Concurrent as Exports hiding (yield)
+import System.Timeout as Exports
+import System.Exit as Exports
+import System.IO.Unsafe as Exports
+import System.IO as Exports (Handle, hClose)
+import System.IO.Error as Exports
+import Unsafe.Coerce as Exports
+import GHC.Exts as Exports (groupWith, sortWith)
+import GHC.Generics as Exports (Generic)
+import GHC.IO.Exception as Exports
+import Debug.Trace as Exports
+import Data.IORef as Exports
+import Data.STRef as Exports
+import Control.Monad.ST as Exports
+
+-- mtl
+import Control.Monad.Identity as Exports hiding (mapM_, sequence_, forM_, msum, mapM, sequence, forM)
+import Control.Monad.Reader as Exports hiding (mapM_, sequence_, forM_, msum, mapM, sequence, forM)
+import Control.Monad.Writer as Exports hiding (mapM_, sequence_, forM_, msum, mapM, sequence, forM)
+import Control.Monad.Trans as Exports
+
+-- bytestring
+import Data.ByteString as Exports (ByteString)
+
+-- text
+import Data.Text as Exports (Text)
+
+-- errors
+import Control.Error as Exports
+
+-- pipes
+import Pipes as Exports
+
+-- cereal-plus
+import CerealPlus.Serializable as Exports
+import CerealPlus.Serialize as Exports (Serialize)
+import CerealPlus.Deserialize as Exports (Deserialize)
+
+
+import qualified Data.ByteString.Lazy
+import qualified Data.Text
+
+
+type LazyByteString = Data.ByteString.Lazy.ByteString
+
+
+(?:) :: Maybe a -> a -> a
+maybeA ?: b = fromMaybe b maybeA
+{-# INLINE (?:) #-}
+
+traceM :: (Monad m) => String -> m ()
+traceM s = trace s $ return ()
+
+applyAll :: Monad m => [a -> m b] -> a -> m [b]
+applyAll ops a = sequence $ map ($ a) ops
+
+packText = Data.Text.pack
+unpackText = Data.Text.unpack
