Repository navigation
Closed
Description
#6 closed when feature PR #33 merged, but PR #34 landed only the policy update, characterization cmocka tests for all eight utility areas, and the crc32 port.
Still to port, following docs/rust-port/testing-policy.md (the characterization tests are now in place as the Tier 2 checks):
- utf8. Not exported from libobs and has a Win32 branch: decide symbol visibility and the Windows path first. (PR feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util #68: the Rust shims are hidden, not exported, and non-Windows only. Windows keeps the C utf8.c.)
- lexer (lexer.c). Follows master's C including the bug: cf_literal_to_str keeps the closing quote after an escape; strref_cmp_strref asymmetric on empty #48 strref ordering fix (libobs/util: Order empty strrefs consistently in strref compares #60). (PR feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util #68)
- cf-lexer / cf-parser / cf-preprocessor. Deferred to a follow-up (testing-policy.md).
- text-lookup. No longer crashes on an opening quote at the end of a line. The shim returns false for a NULL lookup. (PR feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util #68)
- dstr. Do not reproduce the dstr_insert_ch overflow; decide dstr_replace with an empty find. See bug: dstr_insert_ch writes one byte past the buffer when inserting mid-string #46 and bug: dstr_replace never terminates when find is the empty string #47. (PR feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util #68: follows the libobs/util: Fix dstr_insert_ch overrun and dstr_replace hang #53 C fixes, so an empty find is a no-op. strlist_split takes a NUL separator. The wchar/printf/mbs helpers stay C in dstr-libc.c.)
- base. (PR feat(libobs): port base log and crash handlers to Rust #61: log/crash handlers in Rust; the va_list entry points stay C in base-variadic.c.)
- bmem, last. (PR feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util #68: bmalloc/brealloc/bfree/bnum_allocs parity, including the Windows aligned* branch.) Issue Phase 3: characterize and port pure leaf utilities (crc32, utf8, dstr, lexers, text-lookup, base, bmem) #6's acceptance item about
base_set_allocatoris wrong: this tree has no allocator hooks. Use bmalloc/brealloc/bfree/bnum_allocs parity instead.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
b7216309-jpg commentedon Oct 9, 2026
Status of the Phase 3 items, with the open PRs from my fork:
local:inrust-exports.map,rust-unexports-macos.txt;export_list.rsnow checks exported-or-hidden). Windows path: not ported. On Windowsutf8.cwrapsMultiByteToWideCharand stays in C; the guard swaps it on non-Windows only.cf-tokenizer.c) + feat(obs-util): port util/cf-tokenizer.c to Rust (#6) #49 (port, stacked on feat(obs-util): port util/lexer.c to Rust (#6) #41/refactor(libobs): extract the cf lexer into cf-tokenizer.c (#6) #42). The preprocessor andcf-parser.care not ported yet. The bug: cf_literal_to_str keeps the closing quote after an escape; strref_cmp_strref asymmetric on empty #48 quirks are preserved and documented for now (see my comment on bug: cf_literal_to_str keeps the closing quote after an escape; strref_cmp_strref asymmetric on empty #48).dstr-libc.c, since stable Rust can't define variadics) + feat(obs-util): port util/dstr.c to Rust (#6) #51 (port, stacked on feat(obs-util): port util/lexer.c to Rust (#6) #41/refactor(libobs): move libc-bound dstr functions out (#6) #50). The port does not reproduce bug: dstr_insert_ch writes one byte past the buffer when inserting mid-string #46, and makes an emptyfinda no-op (bug: dstr_replace never terminates when find is the empty string #47). libobs/util: Fix dstr_insert_ch overrun and dstr_replace hang #53 fixes both in C, with RED tests.Key=") wraps the length toSIZE_MAX. Details are in feat(obs-util): port util/text-lookup.c to Rust (#6) #52.base_set_allocatorcorrection; bmem will use bmalloc/brealloc/bfree/bnum_allocs parity.Each port has RED → GREEN commits, Tier 1/2-layout/3 tests and a mutation check written up in the PR. I haven't been able to run Tier 2 OFF/ON locally (no Docker on this machine), so the CI runs on these PRs will be their first. Happy to rework anything, and to rebase the stack in whatever order you prefer to review.
libobs/util: Move wide-char and libc-backed dstr helpers into dstr-li…
feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util (#…
libobs/util: Move wide-char and libc-backed dstr helpers into dstr-li…
feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util (#…
libobs/util: Move wide-char and libc-backed dstr helpers into dstr-li…
feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util (#…
libobs/util: Move wide-char and libc-backed dstr helpers into dstr-li…
feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util (#…
libobs/util: Move wide-char and libc-backed dstr helpers into dstr-li…
feat(rust): Port utf8, lexer, text-lookup, dstr and bmem to obs-util (#…
zackees commentedon Oct 25, 2026
Triage (coordinator): tracker. Only one unchecked item remains, cf-lexer / cf-parser / cf-preprocessor, and it has no issue of its own, so there is no child to attach as a sub-issue. Suggest: file that port as its own issue, attach it here, and close this tracker when it merges.
zackees commentedon Oct 30, 2026
Verified against current master (908595e): this tracker is already complete.
OBS_PARITY_CASES=reduced soldr cargo test -p obs-util --lib cf_parser -- --nocapturepasses: 8 passed, 0 failed (including layout and C-oracle parity tests).No remaining Phase 3 port is left for this tracker, so closing it.