Skip to content

libobs: Port the output, encoder and service registration rules to obs-core - #2194

Merged
zackees merged 6 commits into
obs-rust:masterfrom
rdoupe:port/module-type-rules
Oct 24, 2026
Merged

zackees merged 6 commits into
obs-rust:masterfrom
rdoupe:port/module-type-rules

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #1876 (slice 5 of obs-module.c.h; more slices may follow).

What and why

The fifth slice of libobs/obs-module.c.h moves to rust/obs-core: the pure decisions of obs_register_output_s(), obs_register_encoder_s() and obs_register_service_s(). Those are the callbacks each output type needs for its flags, the callbacks each encoder type needs for its type and capabilities, the rule that a texture encoder can't scale itself, the callbacks a service needs, and the protocol dedupe of a service output.

Feasibility. No seam is needed. Each registration passes its flags (outputs), its type and capabilities (encoders) and a bit for each callback that HAS_VAL() finds inside the size, and gets back an error code. The protocol dedupe gets one protocol and the registered list, and returns whether it is already there.

These stay C, in the same order as before:

  • find_output(), find_encoder() and find_service();
  • the size-aware HAS_VAL() checks;
  • the memcpy() and da_push_back() of REGISTER_OBS_DEF();
  • the strlist_split() of the protocols, and the protocol list;
  • the loadingModule lists;
  • every log message (same text, level and order, picked from the returned code);
  • HANDLE_ERROR (free_type_data on error).

The size limit of REGISTER_OBS_DEF() now calls slice 4's obs_module_source_rules_size_supported() rather than adding a second helper.

No exported function moves, so there is no rust-exports.d fragment, and the 1766 exported symbols are unchanged. The unit is its own file, obs-module-type-rules.c.h, with its own header, obs-module-type-rules.h (Rust obs_core::module_type_rules). The header copies the five output flags, the audio encoder type and the two capabilities the rules read. obs-module.c.h checks the copies against obs-output.h and obs-encoder.h with _Static_assert. Still in obs-module.c.h: the decision chain of load_all_callback() and the module loading.

Overlap: no open PR touches obs-module.c.h. #1837 touches obs-internal.h, which this branch does not touch: the declarations are in the new header.

Commits:

  • libobs: Move the output, encoder and service registration rules into obs-module-type-rules.c: a behaviour-neutral extraction. It changes no public function, header or signature. It adds four hidden entry points: obs_module_type_rules_output_check, _encoder_check, _service_check and _protocol_listed.
    • A scratch harness compiled master's three functions and the moved ones side by side, against the same stubs (find_*, blog, memcpy, da_push_back, bstrdup, strlist_split, free_type_data).
    • It ran 2,000,000 random sequences of 1 to 8 registrations: random flags, capabilities, types and callbacks; sizes around every field end, at 0, at the size and above it; duplicates; and preset protocol lists.
    • It compared every lookup, log line, copy, push, strdup, split and free_type_data call, and the final lists: 53.7 million events, no difference.
    • Four deliberate breaks of the moved code were each caught (168 to 9,281 differing sequences out of 20,000).
  • test: Characterize the output, encoder and service registration rules: a new cross-platform test, test_module_type_rules_steps. It is registered in test-graph.json in sorted order, under xvfb-run where a display is needed, with libm off MSVC. It has two parts.
    • The steps: the four moved functions, compiled into the test.
      • Every combination of the five output flags the rules read (video, audio, encoded, service, multi-track), with what each needs in order: raw_audio against raw_audio2, encoded_packet replacing the raw callbacks, and protocols for a service. Each one missing, all, none, only the needed ones, several missing (the first wins), and flag and callback bits the rules don't read.
      • Encoders: audio, video and other types, against plain, scaling, texture, and texture + scaling capabilities (refused before any callback). Then encode against encode_texture/encode_texture2, and audio get_frame_size after the encode rule.
      • Each service callback.
      • The protocol dedupe: whole strings, case-sensitive, untrimmed, an empty protocol, bytes outside ASCII.
    • The callers: obs_register_output_s(), obs_register_encoder_s() and obs_register_service_s() of the real libobs, through the public API (obs_enum_*_types(), obs_get_output_flags(), obs_get_encoder_caps(), obs_get_encoder_type(), obs_enum_output_protocols(), the display names, free_type_data and the log handler).
      • Every message and its level.
      • The order of the checks.
      • Sizes at 0, one byte below a callback's end, at the end, at sizeof() and above it.
      • The protocol merge cases.
      • When the type data is freed.
  • RED, GREEN, Tier 3, then docs and port_comparison.

Safe core (rust/obs-core/src/module_type_rules.rs): output_check, encoder_check, service_check (with Callbacks) and protocol_listed.

  • Flags, capabilities and types are u32, so any value a plugin passes is kept as its bits. Bits the rules don't name are ignored.
  • Protocols are bytes.
  • The module denies clippy's indexing, arithmetic, unwrap and panic lints.

Shim (src/ffi/module_type_rules.rs): the four C signatures.

  • The error enum is a u32: 32-bit on every target (unsigned int with GCC and Clang, int with MSVC).
  • The callbacks come as the C's OBS_MODULE_TYPE_RULES_HAS_* bits.
  • libobs/obs-module-type-rules.c.h moves to libobs.ported-module-type-rules. Its PCH is obs-module-type-rules.h plus string.h.
  • The four symbols are hidden through rust-hidden.txt, rust-exports.map and rust-unexports-macos.txt.
  • There is no test_module_type_rules_steps_rust variant. The archive's obs-core member pulls in the rest of the Rust libobs (obs-util with libuuid and GIO), so it does not link on its own (checked). Next to libobs it would carry a second copy of libobs's Rust symbols. Tier 3 compares the shims with the C instead, and Tier 2 runs the callers against the hybrid libobs.

Kept, characterized, not endorsed:

  • OBS_OUTPUT_MULTI_TRACK without OBS_OUTPUT_AUDIO needs no audio callback. An encoded output needs no raw callback, whatever its video and audio flags.
  • An encoder type other than audio is treated as video (it needs no get_frame_size).
  • In obs-module.c.h (still C):
    • The encoder's type and capabilities are read from the caller's structure whatever the size. A texture encoder that scales itself is refused even when the size ends before its caps. A structure cut before caps is registered with no caps, though the caller's said otherwise.
    • The callbacks are checked before the size limit, so a structure that is too big and lacks a callback reports the callback.
    • A size of 0 reports the missing get_name and frees nothing. The "outside of obs_module_load" message of REGISTER_OBS_DEF() is never reached.

A bug found, not fixed here (C, in HANDLE_ERROR, unchanged by this PR; slice 4's source registration has the same macro): the error path copies the caller's structure cut at the size, then calls free_type_data when both pointers are non-NULL. A size that ends inside free_type_data leaves a partial pointer: one or more low bytes of the caller's pointer, then zeros. That pointer is then called. The move harness hit it (a service registered with size 137 jumped to 0x80), so it skips such sizes on both sides. Only a plugin passing a size other than sizeof() of its structure can reach it, and plugins run in-process anyway. It deserves its own issue: free only when both pointers are whole inside the size.

Intentional differences: the C's strcmp() would read a NULL pointer, and obs-module.c passes none: the protocol comes from strlist_split(), the entries from bstrdup(), and the list is NULL only with num 0. In those cases the shim lists a NULL protocol nowhere, treats a NULL list as empty, and matches a NULL entry with nothing. protocol_listed_null_pointers pins this.

RED → GREEN

  • Characterization: aec272c. test_module_type_rules_steps gives 16/16 on the C backend libobs (run before the latest rebase, same content).

  • RED commit: 10a8f1a obs-core: Add Tier 1 tests for the output, encoder and service registration rules port. obs_core::module_type_rules has 27 tests:

    • the sixteen C cases 1:1, the ten caller cases through a model of the three registrations built on the core;
    • the edges;
    • eight 2048-case proptests.

    24 of them fail on todo!(), checked at 10a8f1a. Callbacks::from_bits, the constants and the size limit through slice 4's helper are not stubs.

  • GREEN: 2e344a0 libobs: Port the output, encoder and service registration rules to obs-core. Tier 1 27/27. Tier 2: test_module_type_rules_steps 16/16 and test_source_registration 10/10 against the C backend libobs, the hybrid libobs and libobs-c-reference.

    • In the hybrid libobs, the four obs_module_type_rules_* symbols are the Rust shims (local), and no obs-module-type-rules object is linked.
    • libobs-c-reference and the C backend still compile the C.
  • Tier 3: b09bce7 (module_type_rules_parity.rs, 13 tests). The oracle is the unmodified C file with its entry points renamed, its strcmp() the C library's. It also gives the constants and the field ends and structure sizes as the C sees them. Compared, as the C enum codes are returned:

    • the constants, against the Rust ones and the shims' codes;
    • output_check exhaustively: every subset of the five flags, with six sets of the bits the rules don't read, × every set of the ten output callbacks, with and without the other callback bits;
    • encoder_check exhaustively: six types × every subset of seven capabilities (plus three wide masks) × every set of the seven encoder callbacks, with and without the other bits;
    • service_check over every callback mask;
    • protocol_listed over fixed lists, every prefix and suffix of them;
    • the whole decision of each registration, each side's functions in the C's order. The callbacks inside the size come from the C's own field ends, then the rule, then slice 4's size limit. It runs at every size from 0 to 16 past each structure, for every output flag set with the present masks the rules tell apart, and every encoder and service mask;
    • five 2048-case proptests over any flags, capabilities, type, callback bits, protocol lists, kind, present mask and size (field ends weighted).

    No proptest regression file: no case failed. The oracle has no division, and none of its inputs reaches a path that traps on MSVC x64.

  • Mutation check: 25 mutants, each reverted (not committed): 23 of the safe core and 2 of the shim. Each cell is the number of failing tests:

Mutant Tier 1 (of 27) Tier 3 (of 13)
start not required 2 4
stop checked before start 1 4
protocols required without the service flag 4 4
protocols never required 4 4
an encoded output also needs the raw callbacks 2 3
raw_audio2 for single-track audio 5 4
multi-track alone needs raw_audio2 2 2
raw_video not required 2 3
texture scaling without the texture cap 5 4
texture scaling checked after the callbacks 3 4
a texture encoder needs both texture callbacks 4 4
a texture encoder needs encode_texture2 only 4 4
a texture encoder also needs encode 3 4
get_frame_size for video encoders 4 4
get_frame_size for any type but video 3 4
get_frame_size checked before encode 2 3
get_protocol not required 3 4
destroy not required 7 8
create checked before get_name 7 8
protocols match ignoring case 2 2
protocols match by prefix 2 3
no protocol is listed 3 3
raw_audio and raw_audio2 bits swapped 7 4
shim: NO_ENCODE and NO_ENCODE_TEXTURE codes swapped 0 4
shim: a NULL entry ends the list 0 1
  • Rebased onto 6c98110db. Nothing conflicted. Every shared list and row was hand-diffed against master afterwards, and only this PR's lines are added: source-sets.json, the three export lists, ci/test_ported_sources.py, test-graph.json, the port_comparison list, the obs-core test main.rs, the oracle lib.rs, the ffi mod.rs, libobs.pch.h and libobs.core+.h.c.
  • Local runs at f9dacfc used two build trees (OBS_LIBOBS_BACKEND=C, and HYBRID with OBS_BUILD_C_REFERENCE=ON; libobs-c-reference built explicitly). They ran headless, with a private Xvfb (-noreset), a private D-Bus, a fresh HOME and TMPDIR unset:
Library test_module_type_rules_steps test_source_registration Module and registration tests (161) Full ctest Exported symbols
C backend libobs 16/16 10/10 in the full ctest 461/461, 0 skipped IDENTICAL (1766)
hybrid libobs 16/16 10/10 in the full ctest 475/476, 0 skipped (see below) IDENTICAL (1766)
libobs-c-reference 16/16 10/10 161/161, 0 skipped not run IDENTICAL (1766)
  • The module and registration tests are every ctest test whose source in test/cmocka names obs_register_ or module, including the _rust variants.
  • The one hybrid failure was test_stinger_media_duration (short_header_plays_whole_clip: the stinger clip was never shown). The machine's load average was about 25 at the time. The test passed 3 of 3 runs on its own, with the same library, and it passed on the C backend. It times a media decode and doesn't register any type.
  • Other local checks, at f9dacfc:
    • soldr cargo test -p obs-data --test obs-tests-core: obs_core::module_type_rules* 40/40.
    • ci/local_gate.py --test-diff origin/master: 3530 nextest tests, 3530 passed, 4 skipped; doctests passed.
    • ci/local_gate.py --lane lint and --lane cross: passed.
    • soldr cargo clippy --target x86_64-pc-windows-msvc --all-targets -- -D warnings: passed. No conversion here depends on the width of c_long.
    • ci/test_build_groups.py, test_ported_sources.py, test_oracle_standins.py, test_sorted_shared_lists.py, test_test_graph_sorted.py, test_cmocka_rust_static_guard.py, test_cmocka_windows_diagnostics.py, test_cmocka_includes.py and test_naming.py: passed.
    • soldr cargo test -p obs-c-oracle --locked --bench port_comparison: passed (each module frees its fixtures).
  • port_comparison: soldr cargo bench -p obs-c-oracle --bench port_comparison -- module_type_rules, 3 passes pinned to one CPU, Linux x86_64, rustc 1.98.1. The machine was heavily loaded (load average about 25), so the single-call rows, a few nanoseconds each, are near the floor and vary widely from run to run. Each call runs once per registered type (the dedupe once per protocol), at startup and when a module loads.
Benchmark Rust C Rust / C (run range)
module_type_rules/output_check 5.22 ns 3.29 ns 1.091 (0.736-2.606)
module_type_rules/encoder_check/texture_video 3.23 ns 3.16 ns 1.023 (0.692-1.175)
module_type_rules/encoder_check/audio 1.77 ns 2.33 ns 0.930 (0.760-0.981)
module_type_rules/service_check 2.16 ns 2.69 ns 0.870 (0.802-1.043)
module_type_rules/protocol_listed 25.59 ns 25.00 ns 1.264 (0.644-1.380)
  • Real app: not applicable. Nothing a user sees changes: the same types are registered with the same flags, caps, protocols and log messages.

Windows/macOS: the cross lane compiles and links the shims, and the Windows clippy run above passed, but nothing ran locally on Windows or macOS. test_module_type_rules_steps is a cross-platform test, but no native Windows or macOS run built it locally. On Windows and macOS, PR CI's Rust lanes run Tier 1 and Tier 3, and the merge queue's Tier 2 runs the C test.

Checklist

  • Base is master (or the description starts with a Stacked: note)
  • I claimed the issue, or no one else has an open PR for it
  • Characterization test (if the unit had none), then RED, then GREEN commits (N/A for docs-only; a focused CI fix may push RED and GREEN together)
  • User-visible change: its line in docs/features.md is added or updated (not applicable: no user-visible change)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): built with scripting ON (PR CI builds no OBS app: run gh workflow run ci.yml --ref <branch> for the full builds) and cross-checked with clang and MSVC (not applicable: no warning or flag changes)
  • Intentional differences from C listed in the parity test header and rust/README.md (ports)

Rebased onto master after #2171 and #2181 merged (head b84376ccc). The only conflicts were the shared lists and the crate prose lists, merged by keeping both entries. After the rebase, the crate's Tier 1 and Tier 3 tests and soldr cargo test -p obs-c-oracle --locked --bench port_comparison pass. The earlier lane runs above are on the pre-rebase SHAs.

…obs-module-type-rules.c

Moves the pure decisions of obs_register_output_s(),
obs_register_encoder_s() and obs_register_service_s() from obs-module.c.h
to libobs/obs-module-type-rules.c.h, ahead of their port to obs-core
(slice 5 of obs-module.c.h, obs-rust#1876). Behaviour-neutral: no public function,
header or signature changes.

Four hidden entry points, declared in obs-module-type-rules.h without
EXPORT (the header copies the output flags, the encoder type and the two
capabilities the rules read, and obs-module.c checks them with
_Static_assert):
- obs_module_type_rules_output_check(): the first callback an output type
  lacks for its flags (get_name, create, destroy, start, stop; protocols
  for a service output; encoded_packet for an encoded one, else raw_video
  for video and raw_audio2 or raw_audio for audio);
- obs_module_type_rules_encoder_check(): a texture encoder that scales
  itself, then the first callback an encoder type lacks (get_name, create,
  destroy; encode_texture or encode_texture2 for a texture encoder, else
  encode; get_frame_size for an audio encoder);
- obs_module_type_rules_service_check(): get_name, create, destroy,
  get_protocol;
- obs_module_type_rules_protocol_listed(): a protocol is already in the
  registered list, by strcmp().

Each takes a bit for each callback HAS_VAL() finds inside the size,
computed in C as before. The size limit of REGISTER_OBS_DEF() goes through
slice 4's obs_module_source_rules_size_supported().

obs-module.c keeps find_output()/find_encoder()/find_service(), the
memcpy() and da_push_back() of REGISTER_OBS_DEF(), the loadingModule
lists, every log message (the same text, level and order, picked from the
returned code), HANDLE_ERROR (free_type_data on error) and the
strlist_split() of the protocols. The file joins libobs.core for now, as
the earlier slices did before their ports.

A scratch harness compiled master's three functions and the moved ones
side by side against the same stubs and compared every lookup, log line,
copy, push, strdup, split and free_type_data call and the final lists over
2,000,000 random sequences of 1 to 8 registrations (random flags, caps,
types, callbacks, sizes around every field end, duplicates and protocol
lists): no difference.

Refs obs-rust#1876
Adds test_module_type_rules_steps, a characterization of the output,
encoder and service registration rules ahead of their port to obs-core
(slice 5 of obs-module.c.h, obs-rust#1876).

The steps: the four hidden functions of obs-module-type-rules.c, compiled
into the test from the moved file:
- every combination of the five output flags the rules read (video,
  audio, encoded, service, multi-track): the callbacks it needs in order
  (raw_audio against raw_audio2, encoded_packet replacing the raw ones,
  protocols for a service), each one missing, all, none, only the needed
  ones, several missing (the first wins), and flag and callback bits the
  rules do not read;
- encoders: audio, video and other types, against plain, scaling, texture
  and texture + scaling capabilities (refused before any callback),
  encode against encode_texture/encode_texture2, get_frame_size for audio
  after the encode rule;
- each service callback;
- the protocol dedupe: whole strings, case-sensitive, untrimmed, only the
  first num entries, an empty protocol, bytes outside ASCII.

The callers: obs_register_output_s(), obs_register_encoder_s() and
obs_register_service_s() of the real libobs through the public API
(obs_enum_*_types(), obs_get_output_flags(), obs_get_encoder_caps(),
obs_get_encoder_type(), obs_enum_output_protocols(), the display names,
free_type_data and the log handler, every message and its level):
- the message for each missing callback, and for a texture encoder that
  scales itself;
- the order: duplicate, texture scaling, callbacks, then size;
- sizes at 0 (get_name missing, nothing freed: the "outside of
  obs_module_load" message is never reached), one byte below a callback's
  end, at the end, at sizeof() and above it;
- the encoder's caps read from the caller's structure even when the size
  ends before them (characterized, not endorsed);
- the protocol merge: each new protocol once, in order, empty entries
  dropped, case-sensitive, nothing from a failed, duplicate or non-service
  output;
- when the type data is freed.

Registered in test-graph.json in sorted order, under xvfb-run where a
display is needed (obs_startup()), with libm off MSVC. 16 of 16 on the C
backend libobs.

Refs obs-rust#1876
…ration rules port

The safe core of libobs/obs-module-type-rules.c.h (obs-rust#1876) as todo!()
stubs in rust/obs-core (module_type_rules), and its Tier 1 tests:
- output_check(), encoder_check(), service_check() and protocol_listed(),
  on u32 flags, capabilities and types, a Callbacks set for the callbacks
  HAS_VAL() finds, and protocols as bytes;
- the sixteen cases of test_module_type_rules_steps one to one, in the
  same order, with the same ids, sizes and messages: the six step cases
  directly, the ten caller cases through a model of the three
  registrations built on the core (the duplicate lookup, the callbacks
  inside the size, the rules, slice 4's size_supported(), the copy cut at
  the size, the protocol split and merge, the log and the freed type
  data);
- the edges (Callbacks::from_bits, the constants, the size limit through
  slice 4's helper) and eight 2048-case proptests: the output rule reads
  only its five flags and its callbacks, more callbacks never hurt, the
  rule broken names a lacking callback, texture scaling first and only
  for both capabilities, any non-audio encoder type is video, a service
  needs its four, and the protocol match is byte equality.

27 tests; 24 fail on todo!() (Callbacks::from_bits, the constants and the
size limit are not stubs).

Refs obs-rust#1876
…s-core

Ports libobs/obs-module-type-rules.c.h to the module_type_rules module of
rust/obs-core. Every obs_register_output_s(), obs_register_encoder_s() and
obs_register_service_s() (every output, encoder and service type libobs's
modules register) takes its callback and texture scaling decisions and its
protocol dedupe from it. The hybrid libobs drops the C file and links the
Rust shims; obs-module.c.h keeps the duplicate lookups, the HAS_VAL() size
checks, the copy and push, the protocol split and list, the loadingModule
lists, the logging and HANDLE_ERROR, and the size limit stays slice 4's
obs_module_source_rules_size_supported().

Safe core (src/module_type_rules.rs), on u32 flags, capabilities and
types:
- output_check(): get_name, create, destroy, start, stop; protocols for a
  service output; encoded_packet for an encoded one, else raw_video for
  video and raw_audio2 (multi-track) or raw_audio for audio;
- encoder_check(): a texture encoder that scales itself first, then
  get_name, create, destroy; encode_texture or encode_texture2 for a
  texture encoder, else encode; get_frame_size for an audio encoder;
- service_check(): get_name, create, destroy, get_protocol;
- protocol_listed(): byte equality against the registered protocols.
Nothing panics, indexes or overflows; the module denies clippy's indexing,
arithmetic, unwrap and panic lints.

Shim (src/ffi/module_type_rules.rs): the four C signatures, the error enum
as u32 (32-bit on every target) and the callbacks as the C's
OBS_MODULE_TYPE_RULES_HAS_* bits. Where the C's strcmp() would read a NULL
pointer (obs-module.c passes none), a NULL protocol is listed nowhere, a
NULL list is empty and a NULL entry matches nothing.

C side: the file leaves libobs.core for its own group,
libobs.ported-module-type-rules (LIBOBS_PORTED_SOURCES), whose PCH is
obs-module-type-rules.h with string.h, so the C reference and the C
backend keep compiling it. The functions are declared without EXPORT, so
the shims are hidden: rust-hidden.txt, rust-exports.map and
rust-unexports-macos.txt. ci/test_ported_sources.py expects the object in
the ported inventory on Linux, Windows and macOS.

Results: Tier 1 27 of 27. test_module_type_rules_steps (16 of 16, under a
private Xvfb) passes against the C-backend libobs, the hybrid libobs (the
four symbols are the Rust shims, local, and no obs-module-type-rules object
is linked) and libobs-c-reference (which still compiles the C).

There is no test_module_type_rules_steps_rust variant against
libobs_rust-static: the archive's obs-core member pulls in the rest of the
Rust libobs (obs-util with libuuid and GIO), so the test does not link on
its own, and next to libobs it would carry a second copy of libobs's Rust
symbols. Tier 3 compares the shims with the C instead.

Refs obs-rust#1876
…les port with the original C

Adds oracle/module_type_rules.c, the unmodified
libobs/obs-module-type-rules.c.h with its four entry points renamed to
oracle_* (its strcmp() the C library's), plus the constants of
obs-module-type-rules.h, obs-output.h and obs-encoder.h and the field ends
and structure sizes the registration reads, as the C sees them; and
module_type_rules_parity in obs-tests-core (13 tests). Compared, as the C
enum codes are returned:
- the constants, against the Rust ones and the shims' codes;
- output_check exhaustively: every subset of the five output flags the
  rules read, with six sets of the bits they do not read, x every set of
  the ten output callbacks, with and without the other callback bits;
- encoder_check exhaustively: six types x every subset of seven
  capabilities (and three wide masks) x every set of the seven encoder
  callbacks, with and without the other bits;
- service_check over every callback mask, with and without high bits;
- protocol_listed over fixed lists (empty, duplicates, case, spaces, bytes
  outside ASCII, every prefix and suffix of the list);
- the whole decision of each registration, each side's functions in the
  C's order: the callbacks HAS_VAL() finds inside the size by the C's own
  field ends, the rule, then slice 4's size limit, at every size from 0 to
  16 past each structure, for every flag set and the present masks the
  rules tell apart (every mask for encoders and services);
- five 2048-case proptests: any flags, capabilities, type and callback
  bits for each check, any protocol lists, and the whole decision over any
  kind, flags, type, present mask and size (field ends weighted).

The intentional differences (NULL pointers the C's strcmp() would read)
are pinned on the shim alone. No proptest regression file: no case failed.

Refs obs-rust#1876
…er and service registration rules

- rust/README.md: obs-module-type-rules.c.h in the obs-core crate row, and
  its row in the port table (what moved, what stays C, the characterized
  cases, the intentional NULL differences, Tier 2 and Tier 3);
- docs/rust-port/naming.md, the obs-core Cargo.toml description and the
  lib.rs docs: the new unit;
- port_comparison: module_type_rules/output_check, encoder_check (a
  texture video encoder and an audio encoder), service_check and
  protocol_listed, in their own file, in the sorted modules![] list. The
  protocol fixtures are owned C strings dropped when the module returns,
  so the leak check passes.

Refs obs-rust#1876
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.

2 participants