diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index aeb1b0c1b9..c407e41d99 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -49,6 +49,10 @@ jobs:
           opam install conf-libcurl
         if: ${{ matrix.os == 'ubuntu-latest' }}
 
+      - run: |
+          brew update
+        if: ${{ matrix.os == 'macos-latest' }}
+
       - run: echo "PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig" >>"$GITHUB_ENV"
         if: ${{ matrix.os == 'macos-latest' }}
 
diff --git a/.gitignore b/.gitignore
index 6b6c028aea..c9f495d6a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ _build/
 .merlin
 _opam/
 node_modules
+dune.lock/
diff --git a/CHANGES.md b/CHANGES.md
index 2ac80cccc4..b0baa2b896 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,6 @@
-## Unreleased
+## v6.0.0 (2024-11-21)
 
+- bump minimum dune version to 3.8 (@avsm)
 - cohttp-eio: Use system authenticator in example.
 - http, cohttp: remove the scheme field from requests. This means that
   [Request.uri] no longer returns the same URI as was to create the request
diff --git a/cohttp-async.opam b/cohttp-async.opam
index bcb3a4a0f6..ac4c737d72 100644
--- a/cohttp-async.opam
+++ b/cohttp-async.opam
@@ -24,7 +24,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.14"}
   "http" {= version}
   "cohttp" {= version}
diff --git a/cohttp-bench.opam b/cohttp-bench.opam
index 23c4b52183..1db6b8ac68 100644
--- a/cohttp-bench.opam
+++ b/cohttp-bench.opam
@@ -23,7 +23,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "core" {>= "v0.13.0"}
   "core_bench"
   "eio" {>= "0.12"}
diff --git a/cohttp-curl-async.opam b/cohttp-curl-async.opam
index 1594a3010b..7bdb8cfe11 100644
--- a/cohttp-curl-async.opam
+++ b/cohttp-curl-async.opam
@@ -20,7 +20,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocurl" {>= "0.9.2"}
   "http" {= version}
   "stringext"
diff --git a/cohttp-curl-lwt.opam b/cohttp-curl-lwt.opam
index 0139e88a51..1ea393a09d 100644
--- a/cohttp-curl-lwt.opam
+++ b/cohttp-curl-lwt.opam
@@ -20,7 +20,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "ocurl" {>= "0.9.2"}
   "http" {= version}
diff --git a/cohttp-curl.opam b/cohttp-curl.opam
index 8895914a25..d7e59a5433 100644
--- a/cohttp-curl.opam
+++ b/cohttp-curl.opam
@@ -18,7 +18,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "ocurl" {>= "0.9.2"}
   "http" {= version}
diff --git a/cohttp-eio.opam b/cohttp-eio.opam
index facffb1db0..810ce0bac5 100644
--- a/cohttp-eio.opam
+++ b/cohttp-eio.opam
@@ -19,7 +19,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "alcotest" {with-test & >= "1.7.0"}
   "base-domains"
   "cohttp" {= version}
diff --git a/cohttp-lwt-jsoo.opam b/cohttp-lwt-jsoo.opam
index b475864351..eaed5edeeb 100644
--- a/cohttp-lwt-jsoo.opam
+++ b/cohttp-lwt-jsoo.opam
@@ -23,7 +23,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "http" {= version}
   "cohttp" {= version}
diff --git a/cohttp-lwt-jsoo/src/cohttp_lwt_jsoo.mli b/cohttp-lwt-jsoo/src/cohttp_lwt_jsoo.mli
index e1b330e7f1..0abfc09943 100644
--- a/cohttp-lwt-jsoo/src/cohttp_lwt_jsoo.mli
+++ b/cohttp-lwt-jsoo/src/cohttp_lwt_jsoo.mli
@@ -44,11 +44,11 @@ end
 
 (** Build an asynchronous engine with chunked/unchucked response data treated as
     raw bytes or UTF *)
-module Make_client_async (P : Params) : Cohttp_lwt.S.Client
+module Make_client_async (_ : Params) : Cohttp_lwt.S.Client
 
 (** Build a synchronous engine with chunked/unchucked response data treated as
     raw bytes or UTF *)
-module Make_client_sync (P : Params) : Cohttp_lwt.S.Client
+module Make_client_sync (_ : Params) : Cohttp_lwt.S.Client
 
 module Client : Cohttp_lwt.S.Client
 (** The [Client] module implements an HTTP client interface using asynchronous
diff --git a/cohttp-lwt-unix.opam b/cohttp-lwt-unix.opam
index 26b3a42dc7..ed75743172 100644
--- a/cohttp-lwt-unix.opam
+++ b/cohttp-lwt-unix.opam
@@ -27,7 +27,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "http" {= version}
   "cohttp" {= version}
diff --git a/cohttp-lwt.opam b/cohttp-lwt.opam
index 46d388995d..558e731e54 100644
--- a/cohttp-lwt.opam
+++ b/cohttp-lwt.opam
@@ -25,7 +25,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "http" {= version}
   "cohttp" {= version}
diff --git a/cohttp-mirage.opam b/cohttp-mirage.opam
index 58059a7608..aa5bd4545d 100644
--- a/cohttp-mirage.opam
+++ b/cohttp-mirage.opam
@@ -27,7 +27,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "mirage-flow" {>= "2.0.0"}
   "mirage-channel" {>= "4.0.0"}
diff --git a/cohttp-mirage/src/client.mli b/cohttp-mirage/src/client.mli
index 0345ac78fc..a67cb2345d 100644
--- a/cohttp-mirage/src/client.mli
+++ b/cohttp-mirage/src/client.mli
@@ -1,5 +1,5 @@
 module Make
-    (P : Mirage_clock.PCLOCK)
+    (_ : Mirage_clock.PCLOCK)
     (R : Resolver_mirage.S)
     (S : Conduit_mirage.S) : sig
   module Connection : Cohttp_lwt.S.Connection
diff --git a/cohttp-mirage/src/net.mli b/cohttp-mirage/src/net.mli
index 491c8f4227..0a64dd7a51 100644
--- a/cohttp-mirage/src/net.mli
+++ b/cohttp-mirage/src/net.mli
@@ -1,5 +1,5 @@
 module Make
-    (P : Mirage_clock.PCLOCK)
+    (_ : Mirage_clock.PCLOCK)
     (R : Resolver_mirage.S)
     (S : Conduit_mirage.S) : sig
   type ctx = {
diff --git a/cohttp-server-lwt-unix.opam b/cohttp-server-lwt-unix.opam
index 0deaa4fcf2..94088f3faf 100644
--- a/cohttp-server-lwt-unix.opam
+++ b/cohttp-server-lwt-unix.opam
@@ -21,7 +21,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "http" {= version}
   "lwt" {>= "5.5.0"}
diff --git a/cohttp-top.opam b/cohttp-top.opam
index 52a1ac867f..27a0995b7b 100644
--- a/cohttp-top.opam
+++ b/cohttp-top.opam
@@ -23,7 +23,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "cohttp" {= version}
   "odoc" {with-doc}
diff --git a/cohttp.opam b/cohttp.opam
index d183ed6086..5bfb7a8517 100644
--- a/cohttp.opam
+++ b/cohttp.opam
@@ -34,7 +34,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "http" {= version}
   "ocaml" {>= "4.08"}
   "re" {>= "1.9.0"}
diff --git a/dune-project b/dune-project
index 0962c6c3a8..052162ce09 100644
--- a/dune-project
+++ b/dune-project
@@ -1,10 +1,10 @@
-(lang dune 3.0)
+(lang dune 3.8)
 
 (name cohttp)
 
 (license ISC)
 
-(using mdx 0.2)
+(using mdx 0.4)
 
 (cram enable)
 
diff --git a/http.opam b/http.opam
index 21f8de8843..20ee556288 100644
--- a/http.opam
+++ b/http.opam
@@ -21,7 +21,7 @@ homepage: "https://github.com/mirage/ocaml-cohttp"
 doc: "https://mirage.github.io/ocaml-cohttp/"
 bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
 depends: [
-  "dune" {>= "3.0"}
+  "dune" {>= "3.8"}
   "ocaml" {>= "4.08"}
   "ppx_expect" {with-test & >= "v0.17.0"}
   "alcotest" {with-test & >= "1.7.0"}
diff --git a/http/src/bytebuffer/bytebuffer.ml b/http/src/bytebuffer/bytebuffer.ml
index 8753de93e3..eb5e9338db 100644
--- a/http/src/bytebuffer/bytebuffer.ml
+++ b/http/src/bytebuffer/bytebuffer.ml
@@ -17,11 +17,7 @@ module Bytes = BytesLabels
    on the bytebuffer.
 *)
 
-type t = {
-  mutable buf : Bytes.t;
-  mutable pos_read : int;
-  mutable pos_fill : int;
-}
+type t = { buf : Bytes.t; mutable pos_read : int; mutable pos_fill : int }
 
 let create size =
   let buf = Bytes.create size in