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
Rename platform folders and files to hosts/{windows,macos,linux,posix} (match the Rust layout) #1009
CI picks OS lanes from the changed paths (#992). Today ci/platform_paths.py needs about 30 tokens and extensions, because platform code is named inconsistently: platform/unix, platform/posix, platform-nix.c, platform-cocoa.m, platform-osx.mm, ...
Standardize on the Rust crate layout, src/platform/<os>/ with <os> in {windows, macos, linux, posix}, and use the same names for C and shared code (platform/<os>/ or *-platform-<os>.c). Then one rule picks the lane:
/platform[/-](windows|macos|linux|posix)[/.] -> that OS lane (posix -> linux + macos)
Enforce the names with the Dylint boundary lint and ci/platform_ifdef_ratchet.py, so a new platform file must use one of the four names. When this is done, drop the legacy tokens from ci/platform_paths.py. OS-named plugins (win-capture, mac-*, linux-*) stay as an explicit list until they are folded in.
Keep upstream diffing in mind: note the renames in the port docs so the C-to-Rust differential mapping still finds the originals.
changed the title [-]Rename platform folders and files to platform/{windows,macos,linux,posix} (match the Rust layout)[/-][+]Rename platform folders and files to host/{windows,macos,linux,posix} (match the Rust layout)[/+]on Oct 16, 2026
Naming change: these folders are host/, not platform/. A host is the machine the code runs on, while "platform" also means third-party services and target triples, and "host" is shorter. The wild linker uses the same name. The targets are now host/{windows,macos,linux,posix} and *-host-<os>.c. The CI rule becomes /host[/-](windows|macos|linux|posix)[/.], with platform accepted as an alias for one release. The full plan, including the Rust src/platform → src/host move and the Dylint rename to ban_host_cfg_outside_boundary, is in #1051.
changed the title [-]Rename platform folders and files to host/{windows,macos,linux,posix} (match the Rust layout)[/-][+]Rename platform folders and files to hosts/{windows,macos,linux,posix} (match the Rust layout)[/+]on Oct 16, 2026
Correction to my last comment: the folder is plural, hosts/ (hosts/{windows,macos,linux,posix}). Single files are *-host-<os>.c. The CI rule is /hosts?[/-](windows|macos|linux|posix)[/.]. See #1051.
Claiming a slice: the two C facades I added today, so they don't become legacy names:
shared/happy-eyeballs/platform/{windows,posix}/ → shared/happy-eyeballs/hosts/{windows,posix}/ (CMake include dir follows)
plugins/text-freetype2/text-freetype2-platform-{windows,cocoa,unix}.c → text-freetype2-host-{windows,macos,posix}.c (the unix file is Linux/FreeBSD/OpenBSD, i.e. posix), plus the header and test_text_freetype2_platform/test_text_aa_file wiring.
Both stay blessed by the current ratchet tokens (windows/macos/posix) and match /hosts?[/-](windows|macos|linux|posix)[/.]. One PR, ci-full. Not touching the Rust crates, libobs/util, frontend or the lint/path rules.
Question: does #1051's "Plan changed (2026-10-16)" (no platform → hosts rename, keep src/platform/, don't restructure C files) supersede this issue? If yes, this can close and #1066 (my slice renaming two new facades to hosts/) should be closed too; I've dequeued it and moved it to draft until it's decided.
Correction: #1066 had already merged (11:07Z) when I wrote the above, so it was not dequeued. Same question remains: if hosts/ is dropped per #1051, I'll send a follow-up renaming those two new facades back to platform naming.
Resolved (maintainer decision, 2026-10-17): the policy is hosts/, not platform/, for host-specific C files (hosts/<os>/, *-host-<os>.c). #1066 stands as merged; no revert follow-up. Disregard my question above.
Closing as resolved by decision. The maintainer settled the naming on 2026-10-17 (comment above): host-specific C files use hosts/<os>/ and *-host-<os>.c. AGENTS.md now records that upstream files keep their names (platform-nix.c.h, platform-cocoa.m.h stay), new host files use the hosts/ names, and ci/platform_ifdef_ratchet.py enforces it. Master already has 30 files under hosts/. The blanket rename this issue proposed is no longer the plan. #1066 stands as merged.
Activity
[-]Rename platform folders and files to platform/{windows,macos,linux,posix} (match the Rust layout)[/-][+]Rename platform folders and files to host/{windows,macos,linux,posix} (match the Rust layout)[/+]zackees commentedon Oct 16, 2026
Naming change: these folders are
host/, notplatform/. A host is the machine the code runs on, while "platform" also means third-party services and target triples, and "host" is shorter. The wild linker uses the same name. The targets are nowhost/{windows,macos,linux,posix}and*-host-<os>.c. The CI rule becomes/host[/-](windows|macos|linux|posix)[/.], withplatformaccepted as an alias for one release. The full plan, including the Rustsrc/platform→src/hostmove and the Dylint rename toban_host_cfg_outside_boundary, is in #1051.[-]Rename platform folders and files to host/{windows,macos,linux,posix} (match the Rust layout)[/-][+]Rename platform folders and files to hosts/{windows,macos,linux,posix} (match the Rust layout)[/+]zackees commentedon Oct 16, 2026
Correction to my last comment: the folder is plural,
hosts/(hosts/{windows,macos,linux,posix}). Single files are*-host-<os>.c. The CI rule is/hosts?[/-](windows|macos|linux|posix)[/.]. See #1051.zackees commentedon Oct 16, 2026
Claiming a slice: the two C facades I added today, so they don't become legacy names:
shared/happy-eyeballs/platform/{windows,posix}/→shared/happy-eyeballs/hosts/{windows,posix}/(CMake include dir follows)plugins/text-freetype2/text-freetype2-platform-{windows,cocoa,unix}.c→text-freetype2-host-{windows,macos,posix}.c(theunixfile is Linux/FreeBSD/OpenBSD, i.e.posix), plus the header andtest_text_freetype2_platform/test_text_aa_filewiring.Both stay blessed by the current ratchet tokens (
windows/macos/posix) and match/hosts?[/-](windows|macos|linux|posix)[/.]. One PR,ci-full. Not touching the Rust crates, libobs/util, frontend or the lint/path rules.Rename the happy-eyeballs and text-freetype2 host files to hosts/<os>
zackees commentedon Oct 16, 2026
Question: does #1051's "Plan changed (2026-10-16)" (no
platform→hostsrename, keepsrc/platform/, don't restructure C files) supersede this issue? If yes, this can close and #1066 (my slice renaming two new facades tohosts/) should be closed too; I've dequeued it and moved it to draft until it's decided.zackees commentedon Oct 16, 2026
Correction: #1066 had already merged (11:07Z) when I wrote the above, so it was not dequeued. Same question remains: if
hosts/is dropped per #1051, I'll send a follow-up renaming those two new facades back toplatformnaming.Rename the happy-eyeballs and text-freetype2 host files to hosts/<os> (…
zackees commentedon Oct 17, 2026
Resolved (maintainer decision, 2026-10-17): the policy is
hosts/, notplatform/, for host-specific C files (hosts/<os>/,*-host-<os>.c). #1066 stands as merged; no revert follow-up. Disregard my question above.docs: New C host files use hosts/<os>/ or *-host-<os>.c (obs-rust#1207)
zackees commentedon Oct 25, 2026
Closing as resolved by decision. The maintainer settled the naming on 2026-10-17 (comment above): host-specific C files use
hosts/<os>/and*-host-<os>.c. AGENTS.md now records that upstream files keep their names (platform-nix.c.h,platform-cocoa.m.hstay), new host files use thehosts/names, andci/platform_ifdef_ratchet.pyenforces it. Master already has 30 files underhosts/. The blanket rename this issue proposed is no longer the plan. #1066 stands as merged.