diff --git a/Changelog.markdown b/Changelog.markdown
--- a/Changelog.markdown
+++ b/Changelog.markdown
@@ -1,3 +1,8 @@
+# v0.3.6 (2024-07-20)
+
+* update to streamly 0.10.1
+* update to streamly-bytestring 0.2.2 which includes a critical fix related to pinned arrays used within streamly
+
 # v0.3.5 (2024-01-12)
 
 * disable extraneous debug logging
diff --git a/curryer-rpc.cabal b/curryer-rpc.cabal
--- a/curryer-rpc.cabal
+++ b/curryer-rpc.cabal
@@ -1,5 +1,5 @@
 Name: curryer-rpc
-Version: 0.3.5
+Version: 0.3.6
 License: PublicDomain
 Build-Type: Simple
 Homepage: https://github.com/agentm/curryer
@@ -21,9 +21,10 @@
         Build-Depends: base >= 4.12 && < 4.19
                      , winery
                      , bytestring
-                     , streamly == 0.9.0
-                     , streamly-core >= 0.1.0
-                     , streamly-bytestring >= 0.2.0
+                     , streamly == 0.10.1
+                     , streamly-core >= 0.2.2
+-- includes critical fix for pinned arrays
+                     , streamly-bytestring >= 0.2.2
                      , network
                      , exceptions
                      , async
diff --git a/src/Network/RPC/Curryer/Server.hs b/src/Network/RPC/Curryer/Server.hs
--- a/src/Network/RPC/Curryer/Server.hs
+++ b/src/Network/RPC/Curryer/Server.hs
@@ -3,16 +3,8 @@
 {- HLINT ignore "Use lambda-case" -}
 module Network.RPC.Curryer.Server where
 import qualified Streamly.Data.Stream.Prelude as SP
-#if MIN_VERSION_streamly(0,9,0)
-import Streamly.Internal.Data.Stream.Concurrent as Stream
-import Streamly.Internal.Serialize.FromBytes (word32be)
-import qualified Streamly.Internal.Data.Array.Type as Arr
-#else
-import qualified Streamly.Data.Array as Arr
-import Streamly.Data.Stream.Prelude as Stream hiding (foldr)
-import Streamly.Internal.Data.Binary.Parser (word32be)
-#endif
 import Streamly.Data.Stream as Stream hiding (foldr)
+import Streamly.Internal.Data.Array (pinnedCreateOf)
 
 import Streamly.Network.Socket as SSock
 import Network.Socket as Socket
@@ -34,6 +26,8 @@
 --import qualified Streamly.Internal.Data.Stream.IsStream as P
 import qualified Streamly.Data.Stream.Prelude as P
 import qualified Streamly.External.ByteString as StreamlyBS
+import Streamly.Data.Stream.Prelude as Stream hiding (foldr)
+import Streamly.Internal.Data.Binary.Parser (word32be)
 import qualified Data.Binary as B
 import qualified Data.UUID as UUIDBase
 import qualified Data.UUID.V4 as UUIDBase
@@ -201,7 +195,7 @@
         if c == 0 then
           pure mempty
           else do
-          ps <- P.takeEQ c (Arr.writeN c)
+          ps <- P.takeEQ c (pinnedCreateOf c)
 --          traceShowM ("envelopeP read bytes", c)
           let !bs = StreamlyBS.fromArray ps
 --          traceShowM ("unoptimized bs")
diff --git a/src/Network/RPC/Curryer/StreamlyAdditions.hs b/src/Network/RPC/Curryer/StreamlyAdditions.hs
--- a/src/Network/RPC/Curryer/StreamlyAdditions.hs
+++ b/src/Network/RPC/Curryer/StreamlyAdditions.hs
@@ -8,13 +8,8 @@
 import Data.Word
 import qualified Streamly.Internal.Data.Unfold as UF
 import Streamly.Network.Socket hiding (acceptor)
-#if MIN_VERSION_streamly(0,9,0)
-import qualified Streamly.Internal.Data.Stream.StreamD as D
-import Streamly.Internal.Data.Unfold.Type (Unfold(..))
-#else
 import qualified Streamly.Internal.Data.Stream as D
 import Streamly.Internal.Data.Unfold (Unfold(..))
-#endif
 
 acceptorOnAddr
     :: MonadIO m
