Add dynamic JavaScript COM implementations - #104
Merged
Conversation
Add cached libffi callback closures, metadata-validated callback marshalling, multi-interface identity, inherited QueryInterface aliases, and generated implement/implementation APIs. Preserve fail-closed ownership and apartment rules, including transactional callback output publication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 565c4300-9e07-40c2-8ad3-875138379a86
Kai Tao (vanzue)
approved these changes
Aug 20, 2026
Shawn Yuan (shuaiyuanxx)
approved these changes
Aug 20, 2026
Mixed-language test coverageWorkflow status: ✅ Passed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CallbackMethodPlanwith cached libffi closures while retaining static callback fast pathsIUnknownidentity, frozen multi-interface views, inherited/base-IID QueryInterface routing, and generatedimplement()/implementation()/as()APIs/comand/com/unsafe, with unsupported ownership, Automation, union, and apartment contracts failing closedScope
Implementations are non-agile and execute synchronously on their creating JavaScript thread. Cross-apartment dispatch, aggregation, COM server registration, custom marshaling, and the complete Automation callback surface remain out of scope.
Validation
cargo test -p dynwinrt— 242 passed, 1 ignoredcargo test -p dynwinrt-codegen— full suite passed with Win32Metadata 71.0.14-previewnpm run test:tsfn— 19/19 passed