You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
facade: libobs ported units (c): 9 platform conditionals already replaced by the Rust port #876
These C units are compiled out when ENABLE_RUST_LIBOBS=ON; the Rust crates (obs-util, obs-media-io) isolate platform code in src/platform/. The C originals remain as the ENABLE_RUST_LIBOBS=OFF oracle. No work except removing the C files when the Rust build becomes the only build; recorded so the ratchet baseline accounts for them.
Class totals: (a) movable 0, (b) stays - public header 0, (c) Rust-ported 9. Total: 9. Line numbers on origin/master.
file:line
macro
branch
class
proposed function / target
libobs/util/base.c:28
!_MSC_VER
printf format attribute for log fn
c
rust/obs-util/src/base.rs + ffi/base.rs
libobs/util/base-variadic.c:35
!_MSC_VER
VPRINTFATTR
c
rust/obs-util ffi/base.rs (variadic shim only)
libobs/util/base-variadic.c:41
!_MSC_VER && !_WIN32
BASE_HIDDEN ELF visibility
c
same
libobs/util/bmem.c:41
_WIN32
_aligned_malloc vs alignment hack
c
rust/obs-util/src/bmem.rs
libobs/util/config-file.c:378
_WIN32
write UTF-8 BOM on Windows
c
rust/obs-util/src/config_file.rs
libobs/util/utf8.c:22
_WIN32
Windows wide<->utf8 conversions
c
rust/obs-util/src/platform/windows/utf8.rs
libobs/media-io/audio-io.c:31
_WIN32
include avrt.h
c
rust/obs-media-io/src/audio_io.rs
libobs/media-io/audio-io.c:207
_WIN32
AvSetMmThreadCharacteristics("Audio")
c
same
libobs/media-io/audio-io.c:239
_WIN32
AvRevertMmThreadCharacteristics
c
same
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: Covered by obs-util / obs-media-io unit and parity (Tier 3) tests; no new tests. Close when the C sources are deleted.
Each move is one function per facade entry, mechanical, so upstream merges stay manageable; the ratchet baseline (step 1) drops by the moved count.
Claiming: #876 (ported libobs C units: the C reference still carries 9 platform conditionals). Same pattern as #853/#851/#872: host code to OS-named files or self-guarded per-OS headers, compiler-only attributes behind existing portable macros, Tier 2 test per slice, cross check, baseline entries removed. The Rust side already keeps its platform code in src/platform/; this is the C reference only.
Activity
zackees commentedon Oct 24, 2026
Claiming: #876 (ported libobs C units: the C reference still carries 9 platform conditionals). Same pattern as #853/#851/#872: host code to OS-named files or self-guarded per-OS headers, compiler-only attributes behind existing portable macros, Tier 2 test per slice, cross check, baseline entries removed. The Rust side already keeps its platform code in
src/platform/; this is the C reference only.media-io/audio-io.c.h(avrt include + MMCSS thread characteristics),util/config-file.c.h(UTF-8 BOM),util/bmem.c.h(aligned allocation).util/base.c.h,util/base-variadic.c.h(printf attribute / ELF visibility),util/utf8.c.h.First PR within a day.
libobs: Windows-only bmem, config-file and audio-io choices in self-g…
test: libobs C reference base and utf8 Windows headers define nothing…
libobs: base printf/visibility and utf8 Windows converter behind self…
libobs: Windows utf8 converter in its own unity group, linked into th…
test: test_utf8_windows compiles the Windows converter's own file (#876)
zackees commentedon Oct 24, 2026
Done in #2155 and #2156. The Windows-only choices in the libobs C reference now live in self-guarded headers that the group PCHs include:
bmem-windows.h: aligned mallocconfig-file-windows.h: UTF-8 BOMaudio-io-windows.h: the MMCSS audio thread, with avrt moved out of the media PCHbase-windows.h:VPRINTFATTRandBASE_HIDDENutf8-windows.h: the Windows converter, now in its own unity grouplibobs.ported-windows-utf8, which the C oracle and test_utf8_windows also compiletest_libobs_reference_hostschecks that these headers define nothing off Windows.Left as is:
media-io/audio-math.his a public header, so its_MSC_VERpragmas stay.libobs: base printf/visibility and utf8 Windows converter behind self…