Repository navigation
libobs: port obs_set_locale to Rust (Refs #5042) - #5061
Merged
Merged
Conversation
This was referenced Nov 19, 2026
zackees
force-pushed
the
port/5042-set-locale
branch
2 times, most recently
from
November 19, 2026 20:45
8d5a7aa to
3cb1490
Compare
zackees
marked this pull request as ready for review
November 19, 2026 20:48
zackees
enabled auto-merge
November 19, 2026 20:49
zackees
disabled auto-merge
November 19, 2026 20:55
zackees
force-pushed
the
port/5042-set-locale
branch
from
November 19, 2026 20:58
3cb1490 to
cf0ee12
Compare
zackees
marked this pull request as draft
November 19, 2026 22:03
Ci-Attestation: {"at":1795149802,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":420,"stamp":"920bf25da72036d309441c8eb88bdc34","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149802,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":420,"stamp":"d5432498a875717e5bd501e66f056d4a","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149802,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":420,"stamp":"11c754b2bdf251cadaae8b35870f2c11","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149802,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":420,"stamp":"e5e8cbac76ead62d30b32032dc236d2d","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149377,"gate":"general/all/client-lint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"f8e18baa310d3bfc32af329e7178e42c","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149802,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":420,"stamp":"159eb94eadfeec4c0e0a95093ce67106","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149379,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"b75e8af94f7cb069855e72dff82915a8","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149379,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"60af6147ab5b5c96862b0ba042c10844","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149378,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"a14d634e5c9208724238a77a7e222899","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149378,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"51eadc3fbccc6bc06663efb80bf3d981","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149378,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"46ab521efe8b8412d0c96299cbc43750","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149378,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"99ca316c00e7a17f548eb6067be20709","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149379,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"8323d201f89698c54b7183b8bd6d34b6","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149379,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"3c6750918de70bea58d208a5436f3a5f","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149378,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"ae5c56fa3ba9d9083de7d6c7875b7c9f","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149378,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"268ba1eb4afeb05273137a72524686ba","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149377,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"a9633cc2848afabb0b78dc760772d0f3","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795149377,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"468a481f3b14f071a261f10ac14b0ad1b19b8111302bda8138773ee7d0b8df36","lane":"client-lint","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":39,"stamp":"e878979661603cdfee3c632506de4207","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Ci-Attestation: {"at":1795151486,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"9f8bffe9cd182f28d34af9cb88d78875b416d3cb45c50dc4eb7de13eb8ffb646","lane":"client-test-x86_64-unknown-linux-gnu","parents":["fea024fb5f5d49e0d2e1bb8c94bf261475debf80"],"secs":1679,"stamp":"1a5c9f8fa45072f437a46f3c5251c6c6","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8","v":1,"via":"run"}
Client-Checks: {"checks":{"base":"088070feed7471d1c8d8914de22963de4a84450d","coverage":"all-tracked-applicable-files","diff":[".github/workflows/build-project.yaml","ci/test_tier2_macos_tail.py","ci/test_tier2_native_target.py","ci/tier2_macos_tail.py","libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-set-locale+.h.c","libobs/build/ported-source-sets/set-locale.json","libobs/cmake/rust-exports.d/obs-core-set_locale.txt","libobs/obs-set-locale-fields.c.h","rust/README.md","rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs","rust/obs-c-oracle/oracle.d/set-locale.list","rust/obs-c-oracle/oracle/set_locale.c","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/ffi/set_locale.rs","rust/obs-core/src/lib.rs","rust/obs-core/src/set_locale.rs","rust/obs-core/tests/obs_core/main.rs","rust/obs-core/tests/obs_core/set_locale.rs","rust/obs-core/tests/obs_core/set_locale_parity.rs","rust/tools/tier2-validate/validate.sh","test/cmocka/build/rust-static-support.json","test/cmocka/set-locale-link-support.c"],"head":"d45022989f12e30a7e5fb76c0156d5c11481a4c5","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"59602fecffb4cd35299575af3f33b730b39d3fc0982fb6b4170932adb4906cc2","tree":"7b55c996343f4491660d0ed92e74b8de9da255b8"}}
zackees
force-pushed
the
port/5042-set-locale
branch
from
November 20, 2026 05:11
cf0ee12 to
7e535cd
Compare
zackees
marked this pull request as ready for review
November 20, 2026 05:13
zackees
enabled auto-merge
November 20, 2026 05:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #5042
obs_set_localenow delegates to a safe Rust core through real private C field adapters. It frees the old libobs-owned locale before copying, stores the new copy before callbacks, forwards the original argument including NULL, skips absent callbacks and reads each next link after dispatch. The original C implementation remains reference-only on every host. Public headers, existing C tests and OBS WebSocket are preserved.After #5246 merged, the port was rebased onto master. Its real locale adapter is a separate lazy member in
test/cmocka/build/rust-static-support.json, shared by CMake and Cargo-native consumers. Master's shared helper replaces the obsolete per-target source list. The commonLIBOBS_TEST_SOURCESfixture registration remains available on all six supported targets.RED
24fdf2b20mirrors the three C characterization cases against a deliberate Rust stub; GREEN52741e847supplies the implementation and differential/layout coverage. The original mutation check rejects reading the next module before dispatch. The landing-support RED/GREEN commits require and register the locale adapter; range-diff preserves the original Rust implementation and test patches.Fresh landing validation:
test_set_localepassed against each freshly rebuilt C-reference/hybrid library.lddverified the actual selected library for each OFF/ON run; their exported symbol sets are identical at 1,769 symbols.ci/windows_link_check.py: all eight Windows MSVC category binaries; hybrid libobs and all 71 Rust-static fixtures on Windows x64 and Darwin arm64; MSVC static/import-provider audit passed. These are Linux-hosted links; native Windows/macOS execution remains hosted../lintrun passed formatting and Ruff but hit an unchanged PipeWire diagnostic test's 0.3-second child-output deadline under load. All four tests in that file immediately passed in isolation. The repository's six-target client-lint lane subsequently passed in 996.5 s, and the push pipeline's complete repository self-tests and validators passed.The extra whole Linux Tier 2 sweep reached its 90-minute cap after 4,511 cache-launcher failures forced an uncached recovery build. Both libraries, the symbol comparison and the focused OFF/ON locale tests succeeded before the cap; the whole sweep is incomplete. Its owned container was stopped and confirmed removed. No source change or global cache cleanup was made for that environment failure.
Tier 4 does not apply to this local API; no behavior change is intended. No new Rust test executable or workflow is added.
Test cost: five tests in the existing Core category; original 25 reduced-parity debug repetitions had a longest combined run of 0.09360 s and peak RSS 25,748 KiB, no test-owned threads and one isolated child per run. The fresh focused Rust tests took 0.02 s after compilation.
Publication through
./pushcompleted all client gates, including Windows GNU category links. Final head7e535cdedc2356f7d1d33df53aae9ac9af28af3dis signed and locally verified, with 19 freshCi-Attestationrecords and aClient-Checksreceipt. No incomplete-evidence fallback warning was emitted. Hosted checks and the merge queue remain the merge gate.