fix(abi): exclude internal Apple recvmsg_x FFI from the C header

cbindgen swept transport/udp.rs's `recvmsg_x` foreign import and its `MsghdrX`
#[repr(C)] struct into the generated C header — they're internal Apple-only FFI,
not part of the public C ABI, and reference socklen_t/ssize_t/iovec which the C
ABI harness doesn't include, so c_abi_harness_round_trips failed to compile.
Add them to cbindgen.toml export.exclude and regenerate the header.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-13 09:44:03 +00:00
parent a6b836cfe4
commit cc0f864e09
2 changed files with 6 additions and 16 deletions
+6
View File
@@ -12,6 +12,12 @@ documentation_style = "c99"
[parse]
parse_deps = false
[export]
# Internal Apple-only FFI (transport/udp.rs `recvmsg_x` batched recv + its `MsghdrX`) — NOT part of
# the C ABI. cbindgen otherwise sweeps the foreign import and its #[repr(C)] struct into the header,
# where socklen_t/ssize_t/iovec are undefined and the C harness fails to compile.
exclude = ["MsghdrX", "recvmsg_x"]
[export.rename]
"InputEvent" = "PunktfunkInputEvent"
"InputKind" = "PunktfunkInputKind"