microsoft / microsoft/microsoft-ui-xaml
Proposal: C++ Module support for the XAML compiler
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
Hello everyone, I've added C++ module support to C++/WinRT and written a blog post about my journey. With my fork, you can reference the modules you need on demand, just like in C#. I've published it on NuGet with the ID YexuanXiao.CppWinRTPlus.
I would like to know if the WinUI team is interested in supporting the use of C++ modules? This would require support from the XAML compiler. Using C++ modules can reduce compilation time, memory usage, and disk usage. I conducted a simple test on this in my blog post. WinRT and WinUI3 are very independent libraries, so it would be very easy for user code to migrate to modules.
The repository link is https://github.com/YexuanXiao/cppwinrtplus, and the blog post is at https://github.com/YexuanXiao/cppwinrtplus/blob/master/about_module.md. The project is currently in the experimental stage, and I hope you'll enjoy it. Welcome any bug reports, feature suggestions, and other feedback.
Development of original C++/WinRT has almost come to a halt, so it's unrealistic to wait for it to implement any features.
**Update:**
The maintainers and I have now released module support in C++/WinRT 3.0, so the only remaining blocker now is the XAML Compiler.
Contributor guide
Research direction
Start by reviewing the linked cppwinrtplus repository and about_module.md to understand the proposed C++ module support, then inspect the XAML compiler's current code-generation and module-handling behavior. Done would mean a defined and implemented path for XAML compiler output to support C++ modules, with validation in the compiler's existing test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100