Repository navigation
Description
Part of #847.
Public C headers must not change (project rule, ABI/API compatibility). These are export/type/attribute selection that stays. Listed for the record and the ratchet allow-list. Where a Rust port exists (threading, util_uint64, audio-math) the Rust side has its own platform module, but the header must keep the conditional.
Class totals: (a) movable 0, (b) stays - public header 33, (c) Rust-ported 0. Total: 33. Line numbers on origin/master.
| file:line | macro | branch | class | proposed function / target |
|---|---|---|---|---|
libobs/graphics/device-exports.h:136 |
__APPLE__ |
IOSurface/open_shared device exports | b | stays - public header |
libobs/graphics/device-exports.h:141 |
__linux__/__FreeBSD__/__DragonFly__ |
dmabuf device exports | b | stays - public header |
libobs/graphics/graphics.h:22 |
__APPLE__ |
include objc runtime | b | stays - public header |
libobs/graphics/graphics.h:481 |
_WIN32 |
gs_init_data.window: HWND | b | stays - public header |
libobs/graphics/graphics.h:483 |
elif __APPLE__ |
gs_window: NSView id | b | stays - public header |
libobs/graphics/graphics.h:485 |
elif __linux__/__FreeBSD__ |
gs_window: x11 id/display | b | stays - public header |
libobs/graphics/graphics.h:819 |
__APPLE__ |
iosurface/shared texture API | b | stays - public header |
libobs/graphics/graphics.h:828 |
elif _WIN32 |
gdi/shared texture API | b | stays - public header |
libobs/graphics/graphics.h:890 |
elif __linux__/__FreeBSD__ |
dmabuf API | b | stays - public header |
libobs/media-io/audio-math.h:23 |
_MSC_VER |
include float.h + pragma warning push | b | stays - public header |
libobs/media-io/audio-math.h:41 |
_MSC_VER |
pragma warning pop | b | stays - public header |
libobs/obs.h:431 |
_WIN32 |
EXPORT obs_init_win32_crash_handler | b | stays - public header |
libobs/util/base.h:79 |
!_MSC_VER && !SWIG |
PRINTFATTR printf attributes | b | stays - public header |
libobs/util/c99defs.h:26 |
_MSC_VER |
deprecated/noreturn/forceinline macros | b | stays - public header |
libobs/util/c99defs.h:48 |
`_MSC_VER | MINGW32` | EXPORT dllexport vs visibility | |
libobs/util/c99defs.h:54 |
_MSC_VER |
PRAGMA_WARN_* macros | b | stays - public header |
libobs/util/curl/curl-helper.h:21 |
_WIN32 && curl>=7.44 |
CURL_OBS_REVOKE_SETTING (Schannel) | b | stays - public header |
libobs/util/dstr.h:42 |
!_MSC_VER |
PRINTFATTR for dstr_printf | b | stays - public header |
libobs/util/pipe.h:41 |
!_MSC_VER |
printf attribute on process_args_add_argf | b | stays - public header |
libobs/util/platform.h:37 |
_WIN32 |
os_stat prototype vs macro to stat | b | stays - public header |
libobs/util/platform.h:203 |
__APPLE__ |
ARCH_BITS | b | stays - public header |
libobs/util/platform.h:206 |
_WIN32 |
ARCH_BITS (nested) | b | stays - public header |
libobs/util/platform.h:207 |
_WIN64 |
ARCH_BITS 64 vs 32 | b | stays - public header |
libobs/util/profiler.h:43 |
!_MSC_VER |
PRINTFATTR | b | stays - public header |
libobs/util/sse-intrin.h:22 |
_MSC_VER/__MINGW32__ |
include emmintrin vs simde | b | stays - public header |
libobs/util/sse-intrin.h:29 |
_MSC_VER && __cplusplus |
include cmath | b | stays - public header |
libobs/util/sse-intrin.h:33 |
__APPLE__ |
include simd/base.h | b | stays - public header |
libobs/util/threading.h:29 |
!_MSC_VER |
include errno.h | b | stays - public header |
libobs/util/threading.h:41 |
_MSC_VER |
select threading-windows.h vs posix | b | stays - public header |
libobs/util/threading.h:98 |
_MSC_VER |
THREAD_LOCAL __declspec vs __thread | b | stays - public header |
libobs/util/util_uint64.h:19 |
_MSC_VER && _M_X64 |
include intrin.h | b | stays - public header |
libobs/util/util_uint64.h:25 |
_MSC_VER && _M_X64 |
mul/div via _umul128 | b | stays - public header |
libobs/util/util_uint64.h:30 |
elif _MSC_VER && clang |
clang-cl 128-bit fallback | b | stays - public header |
Classes: (a) movable behind per-platform files; (b) public-header ABI/export/type selection, stays; (c) already replaced by the Rust port (platform code isolated in src/platform/). Macro column abbreviates the #if expression; ! means negated, elif means an #elif line.
Test approach: No change. Ratchet-lint allow-list entry per file; verify unchanged with the public-header ABI check.
Each move is one function per facade entry, mechanical, so upstream merges stay manageable; the ratchet baseline (step 1) drops by the moved count.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 21, 2026
Claiming: #878.
Decisions: The seven existing public-header exceptions remain unchanged. The other seven listed headers already have explicit per-file counts in the ratchet baseline; retain those stricter bounds and document why their branches stay rather than broadening exemptions. Account for any inventory drift explicitly.
zackees commentedon Oct 21, 2026
Completed in #1602 (merge bafab5b).
All 33 issue-listed conditionals across 14 header interfaces are recorded with current expressions, interface reasons and exact header Git blobs in docs/rust-port/public-header-conditionals.md and its JSON evidence. Seven existing broad exceptions remain unchanged; seven stricter per-file baseline limits remain unchanged and now have documented reasons. The existing exception policy only shrinks, so no broad exemption was added. The two headers outside the common installed list are called out explicitly. The 34th ratchet finding is the Objective-C header include, separate from the 33 conditionals.
ABI-preservation evidence: all 14 header blobs and the entire libobs tree match the audited base exactly; no public header, compiled code, export or build option changed. Exception TOML data and baseline limits are unchanged. Ratchet scan, all 38 ratchet tests, whitespace, PR CI 39547108894 and merge-group CI 39548077420 passed. No remaining work for #878; wider facade work remains in #847.