Skip to content

tools: measure the share of OBS converted to Rust; show it in README.md (#2242) - #2246

Merged
zackees merged 2 commits into
masterfrom
tools/conversion-measure
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
tools/conversion-measure

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Fixes #2242.

  • RED (89e20f79f): ci/test_conversion_measure.py runs against a stub. A fixture tree gives exact counts, and the exclusions (oracle copies, tests, obs-websocket, deps/) are checked. The 11 tests errored.
  • GREEN:
    • tools/conversion/measure.py writes JSON and a text-only SVG that works in both light and dark themes. It has a --check mode.
    • A file counts as ported only when it is included solely through libobs.ported-* groups. The definition is shared with rust/tools/ported_sources.py, which now exposes source_sets, group_members and ported_set_names. Its ported_objects() output is unchanged.
    • A real-tree test checks that the ported set equals the Tier 2 ported-object list.
  • Site build: leaderboard.yml gets one new step, which writes conversion.json and conversion.svg next to leaderboard.jpg. The first checkout is no longer sparse and fetches submodules, so the whole tree is counted. No new workflow file.
  • README: a new "Conversion progress" section embeds the SVG from the leaderboard branch.

Numbers on a8dea6a63 (before the rebase):

  • libobs: 30,843 / 79,045 lines (39.0%). Per host: Linux 39.7%, macOS 41.6%, Windows 40.4%.
  • Whole app: 30,843 / 319,793 (9.6%).
  • obs-websocket, kept by design: 14,020 lines.
  • Rust: 107,159 lines.

Manual cross-check on the same commit: #include lines of every libobs/build/*+.h.* group, then wc -l:

  • Files only in ported-* groups: 129 files, 30,843 lines, an exact match.
  • All groups except rust-variadic: 79,080 lines. That is the script's 79,045 plus the 35-line null-audio-monitoring.c.h, which is excluded because the pulse group replaces it.
  • The issue's 214 files / 34.4k lines was not reproduced. That count probably included groups that aren't compiled on Linux.

@zackees
zackees enabled auto-merge October 24, 2026 21:41
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit c273660 Oct 24, 2026
30 checks passed
@zackees
zackees deleted the tools/conversion-measure branch October 26, 2026 15:46
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.

tools: measure the % of OBS converted to Rust and show it as an SVG in README.md

1 participant