Skip to content

feat(rust): roadmap phase 2 — os_path, serializer, darray ports + Rust/Tier 2 CI (meta #4) - #9

Merged
zackees merged 12 commits into
masterfrom
grind/meta-4-7c2e
Oct 9, 2026
Merged

zackees merged 12 commits into
masterfrom
grind/meta-4-7c2e

Conversation

@zackees

@zackees zackees commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Refs #4 (meta stays open: phases 3–5 not started; grind halted to optimize CI first)
Closes #5

Feature branch for the Rust port unit-testing roadmap (grind run 7c2e). Each phase lands here as its own goal PR; this PR merges into master once every goal is green.

Goal Goal PR Status
#5 Phase 2: finish cmocka suite + CI + Windows/macOS Tier 2 #10 landed
#6 Phase 3: pure leaf utilities — pending
#7 Phase 4: stateful, I/O and platform utilities — pending
#8 Phase 5: graphics math, media-io, parsers, obs-websocket Tier 4 — pending

zackees added 11 commits October 8, 2026 15:50
…cy (#5)

Add the function-extraction rule and the header-inline (static inline /
macro) Tier 2 exemption, plus bmalloc, Windows/macOS export and CI
requirements, before any Phase 2 port. Refs #5
…ion.c (#5)

Behavior-neutral move, as the function-extraction policy requires: the
function body is unchanged, no header or signature changes, and the new
file is always compiled. Refs #5
…core (#5)

- path_extension: safe core + os_get_path_extension shim. NULL path
  returns NULL (C dereferences it); intentional, documented difference.
- array_serializer: safe ArrayOutput core + C ABI shim for the three
  exported functions; write/seek/get_pos stay private callbacks.
- darray: safe DArray + #[repr(C)] struct darray mirror under the
  header-inline exemption (layout is the contract, nothing exported).
- Tier 1 1:1 ports of test_os_path/test_serializer/test_darray, layout
  tests for struct darray/serializer/array_output_data, and proptest
  parity against oracle_* builds of the original C (shim and safe core).
- Test-only bmalloc/brealloc/bfree linked whole-archive into the oracle.
- ENABLE_RUST_LIBOBS=ON drops util/array-serializer.c and
  util/path-extension.c; linux-validate checks both objects.

Refs #5
- Windows: /EXPORT: options from libobs/cmake/rust-exports.txt so obs.dll
  exports the Rust shims; export_list.rs keeps the list in sync with the
  #[unsafe(no_mangle)] shims.
- macOS: ld64 -unexported_symbols_list hides Rust internals.
- rust/tools/tier2-validate/validate.{sh,ps1}: cmocka OFF/ON plus an
  exported-symbol diff on macOS and Windows.
- build-project.yaml (existing workflow only): rust-tests on Linux,
  macOS and Windows via setup-soldr + soldr cargo, rust-linux-tier2 and
  rust-tier2 jobs.

Refs #5
… volume (#5)

The /build volume persists across runs, so an array-serializer.c.o built
before the ENABLE_RUST_LIBOBS guard existed made the ON check fail.
Query ninja -t inputs libobs instead. Refs #5
…ork path on macOS (#5)

- obs-c-oracle build.rs: drop canonicalize(), whose verbatim \\?\ path
  broke MSVC include resolution (C1083 on util/bitstream.c).
- rust-linux-tier2: fetch-depth 0 so versionconfig.cmake finds a tag.
- tier2-validate/validate.sh: set DYLD_FRAMEWORK_PATH for ctest so the
  cmocka tests load the built libobs.framework.
…tree (#5)

A worktree's .git file and its submodules' gitdir links resolve only on
the host, so git describe in versionconfig.cmake failed in the container.
…a tests (#5)

ctest runs each test from its own directory, so the relative framework
path did not resolve.
…test (#5)

macOS: DYLD_LIBRARY_PATH to the obs-deps lib dir (libavcodec etc.).
Windows: obs.dll, w32-pthreads.dll and obs-deps FFmpeg DLL dirs on PATH,
since the cmocka executables are built apart from them.
…rts (#5)

With ENABLE_RUST_LIBOBS=ON the Rust staticlib's compiler_builtins defines
___isOSVersionAtLeast and ___isPlatformVersionAtLeast, which libobs then
exported, so nm -gU differed from the C build (Tier 2 macOS).
Phase 2: finish cmocka suite (os_path, serializer, darray) + CI + Windows/macOS Tier 2
@zackees zackees changed the title feat(rust): unit-testing roadmap phases 2–5 (meta #4) feat(rust): roadmap phase 2 — os_path, serializer, darray ports + Rust/Tier 2 CI (meta #4) Oct 9, 2026
@zackees
zackees marked this pull request as ready for review October 9, 2026 00:37
@zackees
zackees merged commit 893ac48 into master Oct 9, 2026
20 of 21 checks passed
@zackees
zackees deleted the grind/meta-4-7c2e branch October 16, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Phase 2: finish existing cmocka suite (os_path, serializer, darray) + CI + Windows/macOS Tier 2

1 participant