2090 Commits
Author SHA1 Message Date
George Barnett a18bddb0ac Add back NIOFileSystem (#3380)
Motivation:

We accidentally removed the 'NIOFileSystem' module from the
'_NIOFileSystem' product in the last release.

Modifications:

- Rename 'NIOFileSystem' and 'NIOFileSystemFoundationCompat' to 'NIOFS'
  and 'NIOFSFoundationCompat'
- Add back 'NIOFileSystem' which re-exports '_NIOFileSystem' (there was
  no publicly available 'NIOFileSystemFoundationCompat' module to
  remove, only '_NIOFileSystemFoundationCompat').

Result:

Fewer breaks
2025-09-23 17:29:01 +01:00
Cory Benfield f2ebedb36a The formatter changed its mind (#3379) 2025-09-23 14:58:24 +01:00
Fabian Fett 5679824930 [Windows] Ensure WSAStartup is correctly called. (#3366)
### Motivation

- `WSAStartup` isn't called

### Changes

- Change stuff that I have very little idea about until it works

### Result

WSAStartup is now emitted at the correct location for the linker to be
picked up.
2025-09-03 16:16:21 +00:00
George Barnett 66a85ba0e2 Add back _NIOFileSystem (#3367)
Motivation:

In #3363 we converted `_NIOFileSystem` to `NIOFileSystem` and removed
the (unreleased) overloads for FilePath/NIOFilePath. This change adds
back `_NIOFileSystem` such that it matches the API it had at 2.86.0.

Modifications:

- Add back `_NIOFileSystem` and `_NIOFileSystemFoundationCompat` such
that their API is at 2.86.0

Result:

- `NIOFileSystem` uses `NIOFilePath`
- `_NIOFileSystem` uses `FilePath`
2025-09-02 14:56:58 +01:00
Fabian Fett e95d742160 [Windows] Reimplement pwrite (#3364)
Very much like #3361. Just for writing.

Result: NIOPosix compiles on Windows.
2025-09-01 16:12:41 +02:00
Fabian Fett db4d4c2566 [Windows] Sleep instead of WSAPoll, if no outstanding IO (#3365) 2025-09-01 10:55:18 +00:00
George Barnett 7290551b7f Add a NIOFilePath based NIOFileSystem (#3363)
Motivation:

We changed the file path type in `_NIOFileSystem` to use `NIOFilePath`
instead of `FilePath`. Originally we planned to use API shims to avoid
breaking API, however in some cases this was inevitable (i.e. where a
file path is returned to the caller).

To roll over to the new API we will instead introduce the
`NIOFileSystem` module using `NIOFilePath` and have `_NIOFileSystem` use
`FilePath`. Users can then opt-in to the new stable API rather than
having it forced upon them.

The first wave of these changes turns `_NIOFileSystem` into
`NIOFileSystem` and uses `NIOFilePath` for its APIs.

Modifications:

- Remove disfavoured overloads (i.e. `FilePath` APIs)
- Update the `DirectoryEntry` API to use `NIOFilePath`.
- Update tests to use `NIOFilePath` since many were relying on the newly
removed shims
- Remove the underscore from the module names and products
- Remove deprecated methods

A follow up change will re-instate the `_NIOFileSystem` (and compat)
module and products using `FilePath`.

Result:

`NIOFileSystem` has a stable API.
2025-09-01 08:11:14 +01:00
Fabian Fett 5bf5054a83 [Windows] Reimplement pread (#3361)
- pread does not exist in ucrt. We need to reimplement it using read and
lseek.
- `FileDescriptor.setNonBlocking` is currently not needed in Windows to
compile. Let's not compile it.
- Set up correct sys calls for lseek and ftruncate
2025-08-29 13:39:04 +01:00
Fabian Fett c26397c5b4 [Windows] Make SelectorGeneric compile on Windows (#3359)
This is very half implemented, but it makes SelectorGeneric compile on
Windows. So that's a step forward, isn't it?
2025-08-28 16:44:55 +00:00
Fabian Fett 663b627102 [Windows] Return false from concurrency takeover (#3362)
Follow up to #3347. comment:
https://github.com/apple/swift-nio/pull/3347/files#r2307432411
2025-08-28 14:09:36 +00:00
Johannes Weiss f656af6b79 SelectableEventLoop.debugDescription: fix debugDescription deadlock (#3360)
### Motivation:

In #3297, I introduced a deadlock involving `SelectableEventLoop`'s
`debugDescription`. I was under the impression that it's not possible to
call this from outside the `NIO` module so I deemed it safe. That was a
mistake :).

### Modifications:

- Make it impossible to deadlock around
`SelectableEventLoop.debugDescription`.

### Result:

- Fewer deadlocks
2025-08-28 13:08:45 +01:00
Fabian Fett e8c1d6e09b [Windows] Disable Pipelines for now (fatalError) (#3358)
### Motivation

In Linux we can use `epoll` to observe sockets and pipes. WSAPoll sadly
only works for sockets. To observe pipes in Windows we can use
`WaitForMultipleObjects`. However we should try to get to a place where
we can start to fix tests first.

### Changes

- fatalError all pipe functions that do not compile right now.
2025-08-26 12:08:14 +00:00
Fabian Fett aff71b37f5 [Windows] Use recv instead of read (#3357) 2025-08-26 10:30:46 +00:00
Fabian Fett 0878179234 [Windows] Allow _SelectorBackendProtocol to work with Windows Handles (#3356)
`_SelectorBackendProtocol` currently requires the file descriptors to be
of `CInt` (aka Int32). However Windows HANDLES are pointers therefore
`UInt64`s. Let's use the typealias that we already have
`NIOBSDSocket.Handle`.
2025-08-26 12:06:59 +02:00
Fabian Fett 148589720a [Windows] Add shims to make string from GetLastError using FormatMessage (#3353)
If we receive a functions error via `GetLastError`, we can stringify it
via `FormatMessage`. Sadly `FormatMessage` isn't auto imported into
Swift, which is why we need to use the shim layer.
2025-08-19 14:31:06 +00:00
Fabian Fett 9cde8e3a00 [Windows] dup is deprecated on Windows, use _dup instead (#3352) 2025-08-19 13:21:59 +00:00
Fabian Fett 456921a854 [Windows] Fix getenv warnings in NIOPosix and NIOEmbedded (#3351)
Less yellow code.
2025-08-19 12:48:46 +00:00
Fabian FettandGeorge Barnett 806a7276b1 [Windows] Use WSASend as writev equivalent (#3350)
See title. `writev` does not exist in Windows land.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2025-08-19 12:20:43 +00:00
Fabian Fett 54b0dc09ca [Windows] Make SocketChannel.swift compile (#3348)
- vsock isn't supported on windows.
- creating `in_addr` needs conditional compiling
2025-08-19 10:37:12 +00:00
Fabian Fett 3bf9c1bd2c [Windows] fatalError concurrency takeover (#3347)
To make further progress, let's disable the concurrency takeover feature
for now.
2025-08-18 10:50:40 +00:00
Fabian Fett 93102a85ee [Windows] Fix deprecation warnings in NIOCore (#3345)
- `getenv` and `strerror` are deprecated in Windows land
- replace with undeprecated alternatives
- result: less yellow in the build log
2025-08-14 14:04:40 +01:00
Fabian Fett 5dca91e191 [Windows] Make SelectableEventLoop compile (#3344)
- Add overwrite for `write` method that calls undeprecated `_write`
- Add errno global readonly variable
2025-08-13 09:18:50 +00:00
Fabian Fett 357ff9f16e [Windows] Map naming conventions Windows -> Posix (ssize_t) (#3343)
`ssize_t` doesn't exist in Windows land. Windows loves uppercase naming.
Therefore we need a typealias.
2025-08-12 17:37:00 +00:00
Fabian FettandCory Benfield d21f56b4bd [Windows] Make ControlMessage.swift compile (#3342)
See title.

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-08-12 15:36:19 +00:00
Fabian Fett a8b744cb61 [Windows] Make Thread.swift compile (#3341)
See title.
2025-08-12 16:11:18 +01:00
George BarnettandCory Benfield a65e9735ac Drop all server response parts after an invalid header (#3339)
Motivation:

NIOHTTPResponseHeadersValidator drops head/end response parts if they
contain invalid header fields. If a head part is dropped and the server
allows pipelining then the subsequent body/end part will reach the
pipelining handler and result in an assertion failure in debug builds.
In release builds, some parts may be incorrectly written out leading to
protocol violations.

Modifications:

- Drop all response parts after an invalid response part

Result:

- Fewer bugs
- Resolves #3326

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-08-12 09:33:24 +00:00
Fabian FettandCory Benfield 2c9b7c6061 [Windows] Ensure NIOHTTP1 compiles (#3338)
This only needs one `numericCast`.

Previous error:
```
C:\Users\fat\Developer\apple\swift-nio\Sources\NIOHTTP1\HTTPDecoder.swift:113:49: error: cannot convert value of type 'CUnsignedInt' (aka 'UInt32') to expected argument type 'Int32'
 111 |                 statusCode: Int(opaque!.pointee.status_code),
 112 |                 isUpgrade: opaque!.pointee.upgrade != 0,
 113 |                 method: llhttp_method(rawValue: CUnsignedInt(opaque!.pointee.method)),
     |                                                 `- error: cannot convert value of type 'CUnsignedInt' (aka 'UInt32') to expected argument type 'Int32'
 114 |                 keepAliveState: opaque!.keepAliveState
 115 |             ) {
```

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-08-11 17:20:12 +00:00
aryan-25andGeorge Barnett 8997a24524 Update FilePath references to NIOFilePath (#3333)
Motivation:

Currently, file paths are represented by the `SystemPackage.FilePath`
type in `NIOFileSystem`. Following from #3322, we want to use
`NIOFilePath` instead.

Modifications:

This change provides `NIOFilePath` accepting/returning variants to all
existing public methods that accept/return `SystemPackage.FilePath`.

The bulk of the changes are in `FileSystemProtocol` and
`FileHandleProtocol`, and their conforming types. The protocols have
been modified to require `NIOFilePath` accepting/returning methods.
Default implementations are provided for `SystemPackage.FilePath`
accepting/returning methods---these call through to the `NIOFilePath`
variants.

Result:

`NIOFilePath` path representations can now be used with the methods for
interacting with the file system.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2025-08-11 17:29:02 +01:00
Fabian Fett b881f6ec60 [Windows] Add msghdr extension for Windows (#3336)
To be able to compile on Windows eventually, we need to bridge msghdr
and WSAMSG. This PR tries to accomplish this by using extensions on
those types.
2025-08-11 15:49:00 +01:00
Fabian Fett 1944fd3721 [Windows] Ensure ssize_t and socklen_t are available (#3337)
See title.
2025-08-11 15:11:27 +01:00
Klaas Pieter AnnemaandCory Benfield 1c30f0f205 Support options on AsyncTestingChannel and EmbeddedChannel (#3308)
Support options on AsyncTestingChannel and EmbeddedChannel

Fixes #3305 

### Motivation:

The channels are intended for testing purposes so while most options
have no practical use setting and getting them can be useful for
testing.

For example a traceroute implementation will set TTL to the current hop
number. Testing such an implementation requires the channels to pretend
to support the TTL option.

### Modifications:

Added option storage to AsyncTestingChannel and EmbedededChannel and
made `getOptionSync` and `setOptionSync` read and write from that
storage.

### Result:

EmbeddedChannel and AsyncTestingChannel support changing their options.

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-08-05 11:37:04 +01:00
Cory Benfield 41b126283c Don't double-initialize Pipe Bootstraps (#3330)
Motivation:

In #3309 I fixed an issue where the channel initializer would not be
called in some PipeBootstrap paths. Unfortunately, that introduced a new
bug where the initializer was now called twice on some other paths.

Modifications:

Get the number of calls back to 1 on the non-async paths. Add some tests

Result:

Better pipe bootstrap behaviour.
2025-08-01 10:11:41 +00:00
aryan-25andGeorge Barnett 96fbe40aae Add a new file path type, NIOFilePath, backed by SystemPackage's FilePath type (#3322)
Motivation:

Two separate types for representing file paths currently exist:
[`SystemPackage`'s
`FilePath`](https://swiftpackageindex.com/apple/swift-system/1.6.0/documentation/systempackage/filepath)
type and [`System`'s
`FilePath`](https://developer.apple.com/documentation/system/filepath)
type.

`NIOFileSystem` currently uses `SystemPackage`'s `FilePath`. However,
the lack of an API for converting between the two representations means
that users whose application also uses `System.FilePath` may find
interacting with `NIOFileSystem` difficult.

Modifications:

- Added `NIOFilePath`, and its subcomponents `NIOFilePath.Root`,
`NIOFilePath.Component`, and `NIOFilePath.ComponentView`.
- These types mirror the API of `SystemPackage`'s `FilePath` and are
internally backed by it.
- `NIOFilePath` can be initialized from either an instance of
`SystemPackage.FilePath` or `System.FilePath`.

Result:

Reduces the friction of interacting with `NIOFileSystem` by providing a
bridge between `SystemPackage.FilePath` and `System.FilePath`.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2025-07-30 15:13:50 +01:00
Rafael Cepeda 02be63c7f4 Fixes all warnings when -require-explicit-sendable flag is enabled (#3320)
Fixes all warnings when `-require-explicit-sendable` flag is enabled and
enables the flag on macOS CI.

### Motivation:

We want to ensure our public API is either explicitly marked as
`Sendable` or not.

### Modifications:

Marked appropriate public types as `Sendable`, or explicitly defined
their conformance to the `Sendable` protocol as unavailable.

### Result:

We can now enable `-require-explicit-sendable` compiler flag in our
codebase.
2025-07-30 11:50:28 +01:00
Fabian Fett 4205ccaf1c [Windows] IOVector is WSABUF on Windows (#3324)
On Windows there is no iovec, because of this we need to make sure,
that:

1. We use the typealias `IOVector` as much as possible
2. We add platform specific code to `IOVector` extensions

Also adds some more Windows imports to fix some compiler errors.
2025-07-28 18:52:00 +02:00
Fabian Fett 1d72f49390 [Windows] Ensure NIOEmbedded compiles (#3319)
Make NIOEmbedded compile.
2025-07-24 16:02:00 +00:00
Fabian Fett 06f236d37a [Windows] Windows has endianess too (#3317)
TIL there is an `endian.h` on Linux and macOS that is imported through
`<sys/types.h>` on Linux and Apple platforms. Apparently such a header
file does not exist in Windows land. For this reason we need to define
the macros that we need here ourselves.
2025-07-23 17:06:18 +01:00
Rafael Cepeda d6609623dd Fix docc (#3315)
This change fixes an example shown in the ServerBootstrap documentation.

### Motivation:

The current example given to users of ServerBootstrap will show a
Sendable conformance warning in Swift 6.0 or later.

### Modifications:

Changed the example to use `syncOperations`

### Result:

The new example doesn't contain any warnings.
2025-07-23 13:37:57 +01:00
Rafael Cepeda a5fea865ba Fixes a small mistake in the NIOTCPEchoServer README file (#3311)
Fixes a small mistake in the NIOTCPEchoServer README file.
2025-07-21 08:16:51 +01:00
Cory Benfield ee67a96bcb Call channel initializer when using async methods on pipe bootstrap (#3309)
Motivation:

For our async initializers on bootstraps, it's imortant that _both_
channel initializers are called, not only the one that comes as an
argument on the bind function.

Modifications:

Fix the takeOwnershipOfDescriptor async functions to call the
initializer from the bootstrap, and add regression tests.

Result:

Better behaved code.
2025-07-18 09:13:00 +01:00
Johannes Weiss 344db24aaa NIOThread: remove the detached threads functionality (#3304)
### Motivation:

Detached threads are a bad idea, their lifetime becomes random and NIO
doesn't need this functionality (except for in some tests that are
easily refactored)

### Modifications:

- Refactor tests to not use detached threads
- Remove detached threads functionality

### Result:

- Cleaner, less complex and more correct code
2025-07-15 15:20:20 +01:00
Ali AliandGeorge Barnett fe923bbbe6 Make file handle sendable (#3300)
Solve Issue-3295

### Motivation:

Solve https://github.com/apple/swift-nio/issues/3295

### Modifications:

Make a few objects send able. 

### Result:

WriteFileHandle will be sendable

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2025-07-15 12:43:22 +00:00
Johannes Weiss 933b9d738d Structured Concurrency compliant MTELG create/shutdown (#3296)
### Motivation:

Structured Concurrency is helpful but so far, MTELG was very difficult
to use with it mostly because Swift is still missing `async` in
`defer`s.

This builds on
- #3297 
- #3302
- #3304

### Modifications:

- Add MTELG.withELG { ... }

### Result:

MTELG + SC = <3
2025-07-15 12:14:04 +01:00
Johannes Weiss acca4e525c NIOThread refactor: pthread_t lifetimes (#3297)
### Motivation:

NIOThread assumed it can hold onto `pthread_t` forever. Unfortunately,
on Linux, `pthread_t` is dead when the thread got joined (if not
detached) or if it exits (if detached) _which is at a random point in
time_.

### Modifications:

- Only assume ownership owner the `pthread_t` if not detached
- `nil` out the `pthread_t` on `join()`

### Result:

- Fewer `pthread_t` lifecycle bugs.
2025-07-15 10:03:12 +01:00
George BarnettandCory Benfield 664032bdd6 Wrap closures stored in the CallbackList (#3303)
Motivation:

The compiler is better at optimising closures wrapped in nominal types
than raw closures when used as generic parameters. CallbackList is used
a lot and stores an optional closure as well as on optional array of
closures. Wrapping these internally should save some allocations.

Modifications:

- Wrap the element stored in the `CallbackList`.

Result:

Fewer allocs

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-07-14 16:48:26 +00:00
Johannes Weiss 0b65385fad improve inEventLoop checks (#3302)
### Motivation:

`inEventLoop` is very much in the performance path of SwiftNIO,
especially these days with Concurrency, `NIOLoopBound` and friends.
Previously, we relied on `pthread_equal(pthread_self(), myPthread)`,
however, this could cause a number of issues.

1. Holding onto a `pthread_t` after `.join` is actually illegal (fixed
in #3297)
2. Potential ABA issues when `pthread_t` pointer are re-used for new
pthreads
3. Fix would require a lock around `myPthread` which makes things (2x
slower, even without contention)

### Modifications:

- New type `SelectableEventLoopUniqueID` which can be packed into a
`UInt`
- Attach them into a C thread local

### Result:

- Even faster than the old, incorrect version
- old: `measuring: el_in_eventloop_100M: 0.257395375, 0.241049208,
0.243188792, 0.259125916, 0.24843225, 0.229690125, 0.244281541,
0.225078834, 0.236395, 0.233305167`
- new: `measuring: el_in_eventloop_100M: 0.175561125, 0.187225625,
0.199269375, 0.19740975, 0.1922695, 0.179850958, 0.177612458,
0.17665125, 0.17897475, 0.18038775`
- More correct
- Groundwork to make #3297 not make things slower
2025-07-14 17:15:10 +01:00
Johannes Weiss 57d65ddf9c inEventLoop benchmark (#3301)
### Motivation:

PR #3297 is changing `inEventLoop` and `inEventLoop` is very much on the
perf path. So let's add a benchmark

### Modifications:

- Add `(!)inEventLoop` benchmark
- Fix a guaranteed deadlock in `TCPThroughputBenchmark` to make the
benchmarks runnable

### Result:

- More benchmarks
- Fewer hangs
2025-07-14 10:50:58 +00:00
Jesse L. Zamora d09773bd4f ensure <stddef.h> is not imported within extern "C" (#3299)
Add patch for `<stddef.h>` being included inside of extern "C" section
which is invalid in C++.

### Motivation:

When building with C++ interop enabled on Linux, `<stddef.h>` fails to
import because the C++ module `_Builtin_stddef.max_align_t` (which it
includes) is re-imported with C language linkage.

```
<module-includes>:1:10: note: in file included from <module-includes>:1:
1 | #include "/home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/CNIOLLHTTP.h"
  |          `- note: in file included from <module-includes>:1:
2 | 

/home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/CNIOLLHTTP.h:20:10: note: in file included from /home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/CNIOLLHTTP.h:20:
18 | #define C_NIO_LLHTTP_SWIFT
19 | 
20 | #include "c_nio_llhttp.h"
   |          `- note: in file included from /home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/CNIOLLHTTP.h:20:
21 | 
22 | static inline llhttp_errno_t c_nio_llhttp_execute_swift(llhttp_t *parser,

/home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/c_nio_llhttp.h:559:10: note: in file included from /home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/c_nio_llhttp.h:559:
557 | extern "C" { 
558 | #endif
559 | #include <stddef.h>
    |          `- note: in file included from /home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/c_nio_llhttp.h:559:
560 | 
561 | #if defined(__wasm__)

<unknown>:0: error: could not build C module 'CNIOLLHTTP'
/home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/recipe-sysroot-native/usr/lib/clang/17/include/stddef.h:128:1: error: import of C++ module '_Builtin_stddef.max_align_t' appears within extern "C" language linkage specification
126 | 
127 | #if defined(__need_max_align_t)
128 | #include <__stddef_max_align_t.h>
    | `- error: import of C++ module '_Builtin_stddef.max_align_t' appears within extern "C" language linkage specification
129 | #undef __need_max_align_t
130 | #endif /* defined(__need_max_align_t) */

/home/xtremek/Programming/xavgru12/meta-swift-project/poky/build-qemuarm64/tmp-glibc/work/cortexa57-oe-linux/swift-hello-world/1.0/build/checkouts/swift-nio/Sources/CNIOLLHTTP/include/c_nio_llhttp.h:557:1: note: extern "C" language linkage specification begins here
555 | #define INCLUDE_LLHTTP_API_H_
556 | #ifdef __cplusplus
557 | extern "C" { 
    | `- note: extern "C" language linkage specification begins here
558 | #endif
```

### Modifications:

Added a patch to the `update_and_patch_llhttp.sh` file to move this
include to the correct location, and ran the script to actually apply it
to the included `c_nio_llhttp.h` file in the `CNIOLLHTTP` target.

### Result:

swift-nio compiles properly on a package with C++ interop
(`.interoperabilityMode(.Cxx)`) enabled in Linux.

@lhoward @Lukasa
2025-07-14 07:08:19 +00:00
Jesse L. Zamora 2f322f1053 Run update_and_patch_llhttp.sh script to update to 9.3.0 (#3298)
Update llhttp dependency in `CNIOLLHTTP` target ahead of adding a new
patch to the `update_and_patch_llhttp.sh` script.

### Motivation:

We need to update the `update_and_patch_llhttp.sh` script to add an
additional patch to fix compiling swift-nio with C++ interop enabled in
Swift targets. It was recommended to update llhttp separately from the
patch update and ahead of time to keep the changes separate from each
other.

### Modifications:

Ran the `update_and_patch_llhttp.sh` script in the CNIOLLHTTP target to
update the llhttp dependency to the latest version (9.3.0). It appears
that the only changes from 9.2.1 (previous version) is a few new
includes, and the definition of the `UNREACHABLE` macro that is used
instead of the `abort()` call.

### Result:

Everything compiles locally and test suite passes with these changes.

@Lukasa
2025-07-12 14:22:15 +00:00
George Barnett 123887dc4d Add DocC docs for running alloc tests and debugging them (#3293)
Motivation:

Our docs for running alloc counting benchmarks are scattered between a
few places, and our info about debugging allocations is also a bit
outdated.

Modifiactions:

- Add a doc on running the two different flavours of allocation counting
test. Remove the entry about bencharks from the README.
- Add a doc on debugging allocations

Most of the content comes from the original
`docs/debugging-allocations.md` doc but has been updated a little and
includes info about the new stackdiff tool.

Result:

Better docs
2025-07-10 15:31:24 +01:00