diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Revision history for fb-util
 
+## 0.2.0.0
+
+* The folly dependency is now bundled in the Hackage package folly-clib,
+  so that hsthrift and Glean can be built entirely by cabal.
+
 ## 0.1.0.1 -- YYYY-mm-dd
 
 * Builds with GHC 9.8.x
diff --git a/Util/ASan.hs b/Util/ASan.hs
--- a/Util/ASan.hs
+++ b/Util/ASan.hs
@@ -17,7 +17,6 @@
   , byteStringWithCStringLen
   , textWithCStringLen
   , textWithCString
-  , textUseAsPtr
   ) where
 
 import Control.Exception
@@ -31,7 +30,6 @@
 
 import Data.Text.Internal (Text(..))
 import Data.Text.Encoding (encodeUtf8)
-import qualified Data.Text.Foreign as TF
 
 import Util.FFI
 
@@ -96,11 +94,3 @@
   allocaBytes len $ \ptr' -> do
     unsafeWithForeignPtr fp $ \ptr -> copyBytes ptr' (ptr `plusPtr` off) len
     fun (ptr', len)
-
--- Text marshalling
-
-textUseAsPtr :: Text -> (Ptr Word16 -> TF.I16 -> IO a) -> IO a
-textUseAsPtr t@(Text _arr _off len) action =
-    allocaBytes (len * 2) $ \buf -> do
-      TF.unsafeCopyToPtr t buf
-      action (castPtr buf) (fromIntegral len)
diff --git a/Util/Text.hs b/Util/Text.hs
--- a/Util/Text.hs
+++ b/Util/Text.hs
@@ -40,7 +40,6 @@
   , isCfInfixOf
   , UnicodeException
   , Util.Text.withCStringLen
-  , useAsPtr
   , InvalidConversion(..)
   , textToInt
   , hexToInt
@@ -171,14 +170,6 @@
 -- | A convenience wrapper for 'Show'.
 textShow :: Show a => a -> Text
 textShow = Text.pack . show
-
-{-# INLINE useAsPtr #-}
-useAsPtr :: Text -> (Ptr Word16 -> Text.I16 -> IO a) -> IO a
-#ifdef __HASKELL_SANITIZE_ADDRESS__
-useAsPtr = ASan.textUseAsPtr
-#else
-useAsPtr = Text.useAsPtr
-#endif
 
 -- | A pair of a 'Text' and a 'ByteString'. Useful for when we get a
 -- value in one format and we want to lazily compute and cache the
diff --git a/fb-util.cabal b/fb-util.cabal
--- a/fb-util.cabal
+++ b/fb-util.cabal
@@ -3,7 +3,7 @@
 -- Copyright (c) Facebook, Inc. and its affiliates.
 
 name:                fb-util
-version:             0.1.0.1
+version:             0.2.0.0
 synopsis:            Various utility libraries
 homepage:            https://github.com/facebookincubator/hsthrift
 bug-reports:         https://github.com/facebookincubator/hsthrift/issues
@@ -227,7 +227,7 @@
         split ^>=0.2.3.3,
         stm >= 2.5.0 && < 2.6,
         template-haskell >=2.13 && <2.22,
-        text ^>=1.2.3.0,
+        text >= 1.2.3.0 && < 2.2,
         text-show >= 3.10.5 && < 3.12,
         time >=1.8.0.2 && <1.13,
         transformers >= 0.5.6 && < 0.7,
@@ -243,7 +243,17 @@
     else
         pkgconfig-depends: double-conversion
 
+    -- clients of fb-util can specify
+    --    build-depends: folly-clib > 0.0
+    -- to ensure that fb-util is built with +folly
     if flag(folly)
+        -- the version here is spliced automatically by
+        -- 'make setup-folly-version':
+        build-depends: folly-clib==20250713.1537
+    else
+        build-depends: folly-clib==0.0
+
+    if flag(folly)
         exposed-modules:
             Foreign.CPP.Addressable
             Foreign.CPP.HsStruct
@@ -264,11 +274,14 @@
             Util.IOBuf
 
         install-includes:
+            cpp/Constructible.h
+            cpp/Destructible.h
             cpp/HsOption.h
             cpp/HsStdTuple.h
             cpp/HsStdVariant.h
             cpp/HsStruct.h
             cpp/HsStructDefines.h
+            cpp/Marshallable.h
 
         cxx-sources:
             cpp/HsStruct.cpp
@@ -277,8 +290,6 @@
             cpp/Executor.cpp
             cpp/HsStruct.cpp
             cpp/IOBuf.cpp
-
-        pkgconfig-depends: libfolly
 
 common test-common
   extra-libraries: stdc++
