Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Part of the roadmap meta issue. Follows docs/rust-port/testing-policy.md.
Context
Three cmocka tests remain after bitstream. Each breaks an assumption Phase 1 relied on:
test_os_path→os_get_path_extensionis one function insidelibobs/util/platform.c(846 LOC).ENABLE_RUST_LIBOBSonly drops whole files.test_serializer→util/serializer.h(inline functions) +util/array-serializer.c.test_darray→util/darray.his macros andstatic inlinefunctions. It is compiled into every caller, so a Rust symbol can never replace it; the ABI is thestruct darraylayout.- No workflow runs the Rust or C unit tests, and
ENABLE_RUST_LIBOBS=ONhas only been validated on Linux (Windowsobs.dllexports and macOS symbol hiding are TODOs).
Proposal
- Policy PR first (
docs/rust-port/testing-policy.md):- Function extraction: to port part of a C file, first move the function(s) to their own
.cfile in a separate behavior-neutral PR, then port that file. - Header-inline exemption: for
static inline/macro code, Tier 2 is a layout test of the public structs, and Tier 1 and Tier 3 still apply. The C stays in place until every caller is Rust.
- Function extraction: to port part of a C file, first move the function(s) to their own
- Extract
os_get_path_extensiontolibobs/util/path-extension.c(behavior-neutral PR), then port it. - Port
array-serializer.c. The inlineserializer.hfunctions fall under the exemption. darray: Rust tests + parity against the oracle +struct darraylayout test, under the exemption.- Wire tests into the existing
build-project.yaml(pending approval):soldr cargo test --workspace+ cmocka withENABLE_RUST_LIBOBSOFF and ON. - Windows: export the shim symbols from
obs.dll. macOS: hide Rust internals (-unexported_symbols_listor equivalent). Exported-symbol diff OFF vs ON on both.
Acceptance criteria
- Policy PR merged before any port in this phase.
- Each port: RED (Tier 1 against
todo!()stubs) → GREEN shown in its PR; Tier 2/3 pass; mutation check noted. -
test_os_path.c,test_serializer.c,test_darray.cunmodified and passing withENABLE_RUST_LIBOBSOFF and ON. - Layout tests for
struct darray,struct serializer,struct array_output_data. - CI runs Rust tests + cmocka OFF/ON on Linux, Windows, macOS (after approval); exported-symbol sets identical OFF vs ON on all three.
Decisions
- Extraction PRs are separate from port PRs, so each diff is reviewable on its own.
darrayis not forced into a symbol swap; its layout is the contract.os_get_path_extension(NULL)returnsNULLin the Rust port. The C version callsstrlen(NULL), which is undefined behavior, so no caller can depend on it. This is an intentional difference and is documented inrust/README.mdand the shim.- CI runs the Rust tests through soldr:
zackees/setup-soldr(pinned by SHA,cache: false), thensoldr cargo test/clippy/fmt. This follows the approvedsoldr cargo test --workspacerule and AGENTS.md ("never bare cargo").
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(ci): MSVC oracle include path, tags for Linux Tier 2, dyld framew…
fix(linux-validate): pass the OBS version in when run from a git work…
fix(tier2-validate): absolute DYLD_FRAMEWORK_PATH for the macOS cmock…
fix(tier2-validate): put libobs runtime deps on the loader path for c…
fix(libobs): keep compiler-rt version-check helpers out of macOS expo…
zackees commentedon Oct 9, 2026
Landed on feature branch grind/meta-4-7c2e via #10; closes when feature PR #9 merges into master.
Merge pull request #78 from chriscoveries/rust/pipe-port
obs-websocket: Include the screenshot MIME declaration