diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
 
 `hslua-module-text` uses [PVP Versioning][].
 
+## hslua-module-text-1.2.0
+
+Released 2026-01-08.
+
+- Require hslua-packaging-2.4.
+
 ## hslua-module-text-1.1.1
 
 Released 2024-01-18.
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2017-2024 Albert Krewinkel
+Copyright (c) 2017-2026 Albert Krewinkel
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,43 @@
+hslua-module-text
+=================
+
+[![GitHub CI][CI badge]](https://github.com/hslua/hslua/actions)
+[![Hackage][Hackage badge]](https://hackage.haskell.org/package/hslua-module-text)
+[![Stackage Lts][Stackage Lts badge]](http://stackage.org/lts/package/hslua-module-text)
+[![Stackage Nightly][Stackage Nightly badge]](http://stackage.org/nightly/package/hslua-module-text)
+[![MIT license][License badge]](LICENSE)
+
+[CI badge]: https://img.shields.io/github/workflow/status/hslua/hslua/CI.svg?logo=github
+[Hackage badge]: https://img.shields.io/hackage/v/hslua-module-text.svg?logo=haskell
+[Stackage Lts badge]: http://stackage.org/package/hslua-module-text/badge/lts
+[Stackage Nightly badge]: http://stackage.org/package/hslua-module-text/badge/nightly
+[License badge]: https://img.shields.io/badge/license-MIT-blue.svg
+
+An UTF-8 aware subset of Lua's `string` module. The functions
+provided by this module are `upper`, `lower`, `len`, `reverse`,
+`sub`, and `toencoding`.
+
+Intended usage for this package is to preload it by adding the
+loader function to `package.preload`. Note that the Lua `package`
+library must have already been loaded before the loader can be
+added.
+
+
+Example
+-------
+
+``` haskell
+loadProg :: Lua Status
+loadProg = do
+  openlibs
+  preloadModule documenteModule
+  dostring $ "text = require 'text'\n"
+          <> "print(text.upper 'hello')"
+```
+
+
+License
+-------
+
+This package is licensed under the MIT license. See
+[`LICENSE`](LICENSE) for details.
diff --git a/hslua-module-text.cabal b/hslua-module-text.cabal
--- a/hslua-module-text.cabal
+++ b/hslua-module-text.cabal
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 name:                hslua-module-text
-version:             1.1.1
+version:             1.2.0
 synopsis:            Lua module for text
 description:         UTF-8 aware subset of Lua's `string` module.
                      .
@@ -13,19 +13,15 @@
 license-file:        LICENSE
 author:              Albert Krewinkel
 maintainer:          tarleb@hslua.org
-copyright:           © 2017-2024 Albert Krewinkel
+copyright:           © 2017-2026 Albert Krewinkel
 category:            Foreign
-extra-source-files:  CHANGELOG.md
-                   , test/test-text.lua
-tested-with:         GHC == 8.4.4
-                   , GHC == 8.6.5
-                   , GHC == 8.8.3
-                   , GHC == 8.10.7
-                   , GHC == 9.0.2
-                   , GHC == 9.2.8
-                   , GHC == 9.4.8
-                   , GHC == 9.6.3
-                   , GHC == 9.8.1
+extra-source-files:  test/test-text.lua
+extra-doc-files:     CHANGELOG.md
+                   , README.md
+tested-with:         GHC == 9.6
+                   , GHC == 9.8
+                   , GHC == 9.10
+                   , GHC == 9.12
 
 source-repository head
   type:              git
@@ -36,26 +32,29 @@
   default-language:    Haskell2010
   build-depends:       base                 >= 4.11   && < 5
                      , hslua-core           >= 2.3    && < 2.4
-                     , hslua-packaging      >= 2.3    && < 2.4
-                     , text                 >= 1.2    && < 2.2
+                     , hslua-packaging      >= 2.3    && < 2.5
+
   ghc-options:         -Wall
+                       -Wcpp-undef
+                       -Werror=missing-home-modules
+                       -Widentities
                        -Wincomplete-record-updates
+                       -Wincomplete-uni-patterns
                        -Wnoncanonical-monad-instances
+                       -Wpartial-fields
                        -Wredundant-constraints
-  if impl(ghc >= 8.2)
-    ghc-options:         -Wcpp-undef
-                         -Werror=missing-home-modules
-  if impl(ghc >= 8.4)
-    ghc-options:         -Widentities
-                         -Wincomplete-uni-patterns
-                         -Wpartial-fields
-                         -fhide-source-paths
+                       -fhide-source-paths
+  if impl(ghc >= 8.10)
+    ghc-options:         -Wunused-packages
+  if impl(ghc >= 9.0)
+    ghc-options:         -Winvalid-haddock
 
 library
   import:              common-options
   exposed-modules:     HsLua.Module.Text
   hs-source-dirs:      src
   build-depends:       hslua-marshalling    >= 2.1    && < 2.4
+                     , text                 >= 1.2    && < 2.2
   other-extensions:    OverloadedStrings
 
 test-suite test-hslua-module-text
@@ -68,4 +67,3 @@
                      , tasty                >= 0.11
                      , tasty-hunit          >= 0.9
                      , tasty-lua            >= 1.0    && < 1.2
-                     , text
diff --git a/src/HsLua/Module/Text.hs b/src/HsLua/Module/Text.hs
--- a/src/HsLua/Module/Text.hs
+++ b/src/HsLua/Module/Text.hs
@@ -3,7 +3,7 @@
 {-# LANGUAGE TypeApplications  #-}
 {-|
 Module      : HsLua.Module.Text
-Copyright   : © 2017–2023 Albert Krewinkel
+Copyright   : © 2017–2024 Albert Krewinkel
 License     : MIT
 Maintainer  : Albert Krewinkel <tarleb@hslua.org>
 Stability   : alpha
@@ -41,11 +41,8 @@
 
 -- | The @text@ module.
 documentedModule :: LuaError e => Module e
-documentedModule = Module
-  { moduleName = "text"
-  , moduleOperations = []
-  , moduleFields = []
-  , moduleFunctions =
+documentedModule = defmodule "text"
+  `withFunctions`
     [ fromencoding
     , len
     , lower
@@ -54,10 +51,8 @@
     , toencoding
     , upper
     ]
-  , moduleDescription =
+  `withDescription`
       "UTF-8 aware text manipulation functions, implemented in Haskell."
-  , moduleTypeInitializers = []
-  }
 
 --
 -- Functions
diff --git a/test/test-hslua-module-text.hs b/test/test-hslua-module-text.hs
--- a/test/test-hslua-module-text.hs
+++ b/test/test-hslua-module-text.hs
@@ -2,7 +2,7 @@
 {-# LANGUAGE TypeApplications  #-}
 {-|
 Module      : Main
-Copyright   : © 2017-2024 Albert Krewinkel
+Copyright   : © 2017-2026 Albert Krewinkel
 License     : MIT
 Maintainer  : Albert Krewinkel <tarleb@hslua.org>
 Stability   : stable
diff --git a/test/test-text.lua b/test/test-text.lua
--- a/test/test-text.lua
+++ b/test/test-text.lua
@@ -84,7 +84,7 @@
     end),
     test('throws error for unknown encoding', function ()
       assert.error_matches(
-        function () text.toencoding('a', 'utf9') end,
+        function () text.fromencoding('a', 'utf9') end,
         "unknown encoding"
       )
     end),
