Skip to content

rust: Port graphics effect-file creation to obs-graphics #4308

Closed

Description

@zackees

Phase 6 Rust swap for find_cached_effect and gs_effect_create_from_file, targeting obs-graphics. Depends on #4307: behavior-neutral extraction to libobs/graphics/graphics_effect_file.c.h must land first per testing-policy.md. Prerequisite branch: test/4307-effect-file-extract (branch-only delivery; manager opens its PR after the queue drains).

Preserve context-first/path validation and existing diagnostic text; exact strcmp traversal of first_effect/next; cache hit before file read without touching error_string; UTF-8/BOM file loading, failed-read logging, constructor argument and error-string forwarding, result identity and bfree ownership. Existing unchanged test_effect_destroy covers real-device file creation and cached pointer reuse. Add prerequisite dedicated characterization for remaining cache traversal, context/path rejection, failed reads and constructor-failure paths if needed before swapping.

Test plan: Tier 1 safe Rust core assertions, RED stubs then GREEN; minimal C ABI/private context boundary; Tier 3 differential against original C including multi-entry/missing paths and I/O failure; unchanged Tier 2 tests against hybrid and C reference and equal exports. Use obs-tests-graphics, with no new Rust executable. Tier 4 inapplicable to local file wrappers. Keep shader-file functions (#4304/#4306), gs_effect_destroy (#4108), public C headers, existing C tests and plugins/obs-websocket unchanged. Any new private adapter must link its real implementation into Rust-static consumers.

Activity

  1. added
    enhancement
    port
    P2
    size:S
    on Nov 9, 2026
  2. zackees commented on Nov 9, 2026

    @zackees
    MemberAuthor

    Claiming: effect-file Rust swap in slot obs-studio13, branch port/4308-effect-file-rust, stacked on test/4307-effect-file-extract at 39da2b3. 1. Add direct C characterization for cache traversal and failure paths. 2. Commit Rust RED tests, then implement the safe core, ABI bridge and differential oracle. 3. Verify focused tiers and lint, push the branch and hand off its exact range. Branch-only delivery this session; no PR until the queue drains.

  3. added
    ready
    on Nov 9, 2026
  4. 3 remaining items

  5. moved this from In progress to Ready in obs-rust Multiviewon Nov 11, 2026
  6. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #4588 (fcd3d95); verified the merge is an ancestor of origin/master and rust/obs-graphics/src/effect_file.rs exists there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementportreadysize:S

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions