Skip to content

Validate WinRT collection ABI and ownership boundaries - #164

Merged
leileizhang (lei9444) merged 2 commits into
mainfrom
lei9444-collection-abi-boundaries
Sep 18, 2026
Merged

leileizhang (lei9444) merged 2 commits into
mainfrom
lei9444-collection-abi-boundaries

Conversation

@lei9444

Copy link
Copy Markdown
Contributor

Summary

  • Validate collection element ABI, recursive POD ownership, exact types/layouts, ranges, interface QI and complete IID sets before publication. Preserve supported scalar aliases and direct HSTRING/interface ownership.
  • Fail closed for unsupported target-specific shapes. Retain empty-only vectors only for compatible indirect-pointer arguments; preserve the packed bulk-stride/ReplaceAll fix.
  • Make Rust create_vector, create_value_vector and create_map unsafe with explicit contracts. Metadata-taking constructors remain safe; JavaScript/Python signatures are unchanged. Complete struct/HFA support is tracked separately in Support ABI-correct WinRT struct collections across architectures #161.

Validation

  • Live x64 and i686: 59 focused core tests passed on each target.
  • ARM64: test executable cross-built; no native ARM execution claimed.
  • Rebuilt x64 bindings: 10 JS tests, 9 Python tests, JS typecheck and Python stubtest (3 modules) passed.
  • Rust formatting and whitespace checks passed. Uncapped Clippy remains blocked by pre-existing denied lints in unrelated code (mut_from_ref, not_unsafe_ptr_arg_deref, approx_constant); this is not a full-CI pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Mixed-language test coverage

Workflow status: ✅ Passed

Layer Lines Functions Branches/regions
Rust, including native .pyd/.node 86.03% 81.16% 85.59% regions
Python aggregate 71.06% n/a 37.9% branches
Python runtime 99.12% n/a 97.37% branches
Generated Python WinRT projections 70.05% n/a 27.07% branches
Generated Python WinRT implementations 72.29% n/a 47.04% branches
JavaScript aggregate 22.14% 25.21% 57.88% branches
JavaScript runtime 44.27% 45.76% 78.99% branches
Generated WinRT projections 22.97% 18.71% 54.94% branches
Generated WinRT implementations 48.66% 59.76% 61.14% branches
Generated Classic COM projections 11.92% 23.97% 54.2% branches

View workflow run and download full HTML/LCOV/XML reports

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bdea384f-3022-47e8-8c74-11fd768c2105
@lei9444
leileizhang (lei9444) merged commit b9d1a8e into main Sep 18, 2026
33 checks passed
@lei9444
leileizhang (lei9444) deleted the lei9444-collection-abi-boundaries branch September 18, 2026 10:49
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.

2 participants