Repository navigation
Description
Phase 6 Rust swap of libobs/obs-output-get-last-error.c.h into obs-output, after prerequisite #5294 lands. The prerequisite characterizes the original C implementation with real C output/encoder objects and unchanged public-API assertions. Preserve the public C API/ABI.
Port the selection rules into a safe core, with a thin FFI wrapper and real private C field projections for C-owned storage. Preserve obs_output_valid's exact NULL diagnostic and validation before field reads. Read the output's own last_error_message first; otherwise scan video encoder slots in ascending order, then audio encoder slots in ascending order, returning the first non-NULL error pointer or NULL. Lower-priority fields must not be queried after a result is found. Empty strings and non-UTF-8 bytes remain valid borrowed errors. No copying, caching, reference ownership change or added locking; do not substitute a locking encoder getter or change stop-signal ownership.
Acceptance: RED then GREEN, Tier 1 cases mirroring every prerequisite assertion, layout/field boundary checks, unchanged C characterization against both C reference and hybrid libobs, and Tier 3 original-C differential plus a demonstrated mutation failure. The prerequisite test's OUTPUT_LAST_ERROR_EXTERNAL mode exercises the linked replacement without compiling the original body. Extracted source moves as a whole into a ported unity group; exported symbol sets stay identical. Network Tier 4 does not apply.
Discover and use the shared real native link support from #5246. No aborting stubs, fake core globals or per-consumer support fragments. Validate the whole native_build:: module, the new fixture plus EVERY configured *_rust target on Linux and the Windows MSVC/Darwin arm64 links; preserve real adapter binding on both linkers. Full lint once. No existing C test/public-header edits, WebSocket changes or new workflows.
Dependency: #5294 must merge first. Do not claim until that prerequisite is complete.
Prerequisite PR: #5307. It contains the immutable characterization and behavior-neutral extraction for #5294. Its signed validated head is b127671; the Rust swap must start from master after that prerequisite lands.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 20, 2026
Claiming: port the extracted output last-error query (libobs/obs-output-get-last-error.c.h, landed in #5307) to obs-output, RED then GREEN, Tier 1-3 per the issue.
test: mirror output last-error query characterization (RED, Refs #5308)
obs-output: swap output last-error query to safe Rust (Refs #5308)
test: mirror output last-error query characterization (RED, Refs #5308)
obs-output: swap output last-error query to safe Rust (Refs #5308)
rdoupe commentedon Nov 20, 2026
Done in #5339 (merged):
obs-output-get-last-error.c.hnow builds only in its ported group and the entry points are Rust on master. The PR said Refs, so closing by hand.obs-output: swap output last-error query to safe Rust (Refs obs-rust#…