Skip to content

fix(windows): preserve current Rust UI codegen units - #8022

Merged
proggeramlug merged 2 commits into
mainfrom
fix/windows-ui-coff-exports
Aug 13, 2026
Merged

fix(windows): preserve current Rust UI codegen units#8022
proggeramlug merged 2 commits into
mainfrom
fix/windows-ui-coff-exports

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Summary

  • recognize current rustc .rcgu.o archive-member names when rebuilding Windows UI libraries
  • keep allocator/non-codegen members excluded while extracting every UI codegen unit
  • extend the COFF dedup regression fixture with a sibling .rlib whose member uses the current naming shape

Root cause

While validating the Windows event-pump fix for #6617, a real perry/ui compile failed with undefined perry_ui_* exports. Current rustc emits members such as perry_ui_windows-<hash>.<opaque>.<hash>.rcgu.o; the trimmer only recognized names containing literal .cgu. or -cgu., so it skipped all 16 UI objects after using their symbols to remove the staticlib copies.

Validation

  • cargo test --profile perry-dev -p perry --bin perry coff_archive_dedup_drops_only_fully_provided_members -- --nocapture
  • cargo test --profile perry-dev -p perry --bin perry rust_codegen_unit_recognizes_current_and_legacy_member_names
  • cargo fmt --all -- --check
  • git diff --check
  • rebuilt perry-ui-windows for x86_64-pc-windows-msvc
  • compiled a real TypeScript perry/ui app; the trimmer extracted 16/16 rlib CGUs and produced a 5.6 MB PE
  • launched the resulting executable for two seconds; it remained alive in its Win32 message loop

No version bump.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@proggeramlug, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 215cddbe-6f84-44c7-a3b7-f6a756eba845

📥 Commits

Reviewing files that changed from the base of the PR and between 9863a98 and e69558b.

📒 Files selected for processing (2)
  • changelog.d/8022-windows-ui-coff-exports.md
  • crates/perry/src/commands/compile/strip_dedup.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug proggeramlug left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Audited exact commit e69558b against current main. The .rcgu.o suffix is the correct discriminator for current and legacy rustc codegen-unit members while excluding lib.rmeta and ordinary bundled native objects. The sidecar-r​lib fixture exercises the corrected extraction path, the host-level predicate regression passes, formatting and diff checks are clean, and the current-main merge tree is conflict-free. No blocking findings.

@proggeramlug
proggeramlug merged commit ede36c4 into main Aug 13, 2026
26 of 56 checks passed
@proggeramlug
proggeramlug deleted the fix/windows-ui-coff-exports branch August 13, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant