Repository navigation
Add packaged Windows App SDK bootstrap for Python and Node.js - #225
Merged
leileizhang (lei9444) merged 5 commits intoOct 29, 2026
Merged
Conversation
Generate package-local Bootstrap resources for Python and Node.js and support configuration-driven calls to the existing initializers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mixed-language test coverageWorkflow status: ✅ Passed
|
Use the existing native-module import pattern for Bootstrap configuration. Restore one checksum-verified SDK corpus in Build and coverage while preserving exact member and dispatcher assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Accept short-name and long-name spellings of the same verified metadata file in CI without weakening the content check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
leileizhang (lei9444)
added a commit
that referenced
this pull request
Oct 28, 2026
Restore and verify one SDK corpus in Build and coverage instead of reading the runner's rolling installation. Reuse the CI-only pinning fix from PR #225 and preserve exact nullability and dispatcher assertions without changing production generation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c
Use --winappsdk-bootstrap-path for repeatable file or directory inputs. Discover matching DLLs only within supplied trees, identify architecture from PE data, and preserve strict explicit-file validation and atomic bundle publication. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require an npm package-root import for JavaScript Bootstrap registration and peer dependencies, including retained bundles in later generation passes. Preserve file-based runtime imports when Bootstrap bundling is disabled and report unsupported combinations before changing output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
shisan (qiutongMS)
approved these changes
Oct 29, 2026
leileizhang (lei9444)
added a commit
that referenced
this pull request
Oct 29, 2026
* Accept string keys in Python ResourceDictionary projections Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c000b813-441b-407a-bac9-7d03e70279c0 * Fix string enum keys in Python ResourceDictionary Normalize ResourceDictionary string subclasses to their underlying str before explicit String boxing. Cover enum keys in generated stubs, inline consumers, native Mapping operations and the WinUI runner without changing generic Object boxing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c * Pin Windows SDK metadata used by CI corpus tests Restore and verify one SDK corpus in Build and coverage instead of reading the runner's rolling installation. Reuse the CI-only pinning fix from PR #225 and preserve exact nullability and dispatcher assertions without changing production generation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c * Preserve inherited ResourceDictionary key contracts and default typing Retain resolved WinMD ancestor identities and apply the checked ResourceDictionary key contract to derived projections. Emit Mapping default TypeVars at module scope for Pyright inference and runtime annotation resolution. Add independent-default-interface and multilevel inheritance controls, pinned-Pyright inline/stub checks, and unchanged generic Object-map coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c000b813-441b-407a-bac9-7d03e70279c0 Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c
leileizhang (lei9444)
deleted the
lei9444-python-winui-bootstrap-helper
branch
October 29, 2026 03:17
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
Package Windows App SDK Bootstrap configuration and DLLs with generated Python and JavaScript bindings. Applications can then use the existing initialization APIs without maintaining project-specific SDK paths, version constants, or Bootstrap environment variables.
Changes
--winappsdk-versionand repeatable--winappsdk-bootstrap-pathoptions accepting DLL files or directories. Directory discovery recursively matchesMicrosoft.WindowsAppRuntime.Bootstrap.dllonly within the supplied trees. PE content identifies x64/ARM64; unsupported directory matches are reported and ignored, while unsupported explicit files are rejected. Identical payloads are deduplicated, while conflicting binaries or license files are rejected.Usage
Given WinMD input/reference lists and Bootstrap DLLs from the same Windows App SDK release:
Repeat
--winappsdk-bootstrap-pathto supply individual DLLs, additional directories, or both. Each supplied directory must contain a supported DLL.--winappsdk-versionis the stable productMAJOR.MINOR, not a full NuGet servicing version.Install the generated package with the matching DynWinRT runtime. Within the application's existing COM apartment, Python can initialize the SDK without importing the generated bindings first:
For Node.js, generate with
--lang jsand import the generated package before initialization:Compatibility
The Windows App Runtime must still be installed. Bundling the Bootstrap DLL does not provide self-contained deployment, and configuration imports do not initialize COM or the Runtime. Applications retain control of initialization and UI lifetime.
JavaScript Bootstrap bundling requires
--import-nameto identify a scoped or unscoped npm package exposing/winappsdk(default@microsoft/dynwinrt). File paths and package subpaths are rejected before output changes, including subsequent passes without Bootstrap options. Generation without Bootstrap bundling retains existing file-import support.This change does not add support for architectures other than x64 and ARM64. SDK binaries retain their original redistribution terms; no SDK binaries are committed to this repository.
Validation
Windows SDK corpus tests use a versioned, SHA-256-verified metadata fixture rather than the runner's installed SDK. Existing corpus counts and member assertions remain unchanged; this pin applies only to tests, not application SDK selection.
cargo test -p dynwinrt-codegen --lib --quiet: 664 passed; one existing ignored test.cargo test -p dynwinrt-codegen --bin dynwinrt-codegen --test winappsdk_bundle_test --test python_generator_version_test --quiet: 81 CLI, 30 Bootstrap bundle, and 5 producer-version tests passed.python -m pytest bindings\py\tests -q: passed; 14 existing optional WinUI skips.python -m mypy.stubtest dynwinrt --allowlist bindings\py\stubtest_allowlist.txt --ignore-disjoint-bases: passed with mypy 1.20.2 and a rebuilt runtime wheel.Package-generation and installation checks cover repeated and overlapping inputs, conflicts, incremental generation, Python wheels/editable installs, and packed npm installations from different working directories. Eighteen real-SDK directory/file/package checks passed for Python and JavaScript, including x64/ARM64 output, ARM64EC duplicates identified as x64, and x86 diagnostics. Node/npm checks also cover scoped and unscoped runtime packages, rejected file imports, retained bundles, and working unconfigured relative/absolute file imports. Regression tests also cover linked or unreadable inputs and atomic failure rollback. Native ARM64 execution and local ARM64 builds remain unverified; the local ARM64 MSVC toolchain is unavailable.