{"id":15418056,"url":"https://github.com/alvinhochun/mingw-w64-cppwinrt","last_synced_at":"2025-04-19T14:40:22.922Z","repository":{"id":67175089,"uuid":"577746686","full_name":"alvinhochun/mingw-w64-cppwinrt","owner":"alvinhochun","description":"Using the C++/WinRT language projection with","archived":false,"fork":false,"pushed_at":"2023-02-14T11:29:20.000Z","size":2116,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T08:43:44.750Z","etag":null,"topics":["cpp","cpp20","cppwinrt","mingw-w64","windows","winrt"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvinhochun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-13T12:38:15.000Z","updated_at":"2025-02-20T18:19:18.000Z","dependencies_parsed_at":"2024-04-19T08:00:59.154Z","dependency_job_id":null,"html_url":"https://github.com/alvinhochun/mingw-w64-cppwinrt","commit_stats":{"total_commits":45,"total_committers":1,"mean_commits":45.0,"dds":0.0,"last_synced_commit":"ce354ccbfae3dd9abb66c3782c2aee7ad43291ab"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinhochun%2Fmingw-w64-cppwinrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinhochun%2Fmingw-w64-cppwinrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinhochun%2Fmingw-w64-cppwinrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvinhochun%2Fmingw-w64-cppwinrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvinhochun","download_url":"https://codeload.github.com/alvinhochun/mingw-w64-cppwinrt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716272,"owners_count":21315062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp20","cppwinrt","mingw-w64","windows","winrt"],"created_at":"2024-10-01T17:19:08.378Z","updated_at":"2025-04-19T14:40:22.905Z","avatar_url":"https://github.com/alvinhochun.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2022-2023 Alvin Wong\nSPDX-License-Identifier: MIT\n--\u003e\n\nC++/WinRT on MinGW-w64\n======================\n\n[C++/WinRT][cppwinrt] is a C++ binding (officially \"language projection\") for the WinRT[^1] APIs. Originally developed by Kenny Kerr, it has become a part of the official Windows SDK and the recommended way to consume WinRT APIs from C++. See also the [official introduction to C++/WinRT][intro] and the [WinRT API reference][apiref].\n\nC++/WinRT was made with MSVC in mind, but a series of changes to make it compatible with GCC and Clang (also libstdc++ and libc++ respectively) has been merged upstream, making it usable with various MinGW-w64 toolchains (with some limitations). This is a collection of documentation and example code intended to help you understand how to use this binding with a MinGW-w64 toolchain.\n\nIf you want to see how C++/WinRT works within Visual Studio, I attempted to document it [in a separate file](docs/how-its-done-in-visual-studio.md).\n\n\u003e **Note:** If you are using MSVC and Visual Studio, please use the [official NuGet package][nuget] instead.\n\n\u003e ⚠️ **Warning: The information here is work in progress and experimental.**\n\n[^1]: Windows Runtime, not to be confused with the operating system that was called \"Windows RT\".\n\n[cppwinrt]: https://github.com/microsoft/cppwinrt\n[intro]: https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/\n[apiref]: https://learn.microsoft.com/en-us/uwp/api/\n[nuget]: https://www.nuget.org/packages/Microsoft.Windows.CppWinRT/\n\n\nStatus\n------\n\n* ✅ Calling simple WinRT APIs should work.\n* ✅ Some test cases of the upstream test suite pass with MinGW-w64.\n* ❌ XAML UI has not been explored but likely doesn't work out of the box.\n* ❌ Authoring WinRT components is currently impossible (missing tooling to produce WinMD from IDL.)\n* ⚠️ Consuming custom WinRT components may work but has not been tested.\n* ⚠️ Anything involving coroutine needs more testing.\n* ⚠️ Some untested functionality may break in various ways.\n\n\nUsage Guide\n-----------\n\n### Toolchain\n\nC++/WinRT requires C++20 for its coroutine support. (C++/WinRT officially supports C++17 but only with MSVC-specific coroutine extensions.) You will need a rather recent compiler. You should also try to get the latest MinGW-w64 runtime and headers.\n\nCompilers:\n\n* LLVM/Clang:\n    * ✅ LLVM 15 is recommended.\n    * 🔲 LLVM 14 is untested.\n    * ⚠️ LLVM 13 does not work out of the box due to missing a floating point `std::to_chars` implementation in libc++, but can be worked around by disabling the `winrt::to_hstring(float)` and `winrt::to_hstring(double)` overloads (https://github.com/microsoft/cppwinrt/pull/1257). It also contains only experimental coroutine support (the stabilized implementation is only available since libc++ 14) so anything involving coroutines should be considered unstable and to be avoided.\n    * ⚠️ Earlier versions are untested.\n* GCC:\n    * ✅ GCC 12 in MSYS2 has been tested to work.\n    * 🔲 GCC 11 is untested.\n    * ⚠️ GCC 10 is missing a floating point `std::to_chars` implementation in libc++ (same as LLVM 13).\n    * ❌ GCC 9 and earlier do not support coroutine.\n\nTested toolchains:\n\n* [llvm-mingw](https://github.com/mstorsjo/llvm-mingw)\n* [MSYS2](https://www.msys2.org/)\n\n### Using cppwinrt with Prebuilt Headers\n\nHeaders are built on [GitHub Actions][GHA] workflow runs and made available as build artifacts.\n\n[GHA]: https://github.com/alvinhochun/mingw-w64-cppwinrt/actions\n\n### Build System Integration\n\nThis project provides both CMake config file and pkg-config file in the releases for using the headers with build systems such as CMake and Autotools. To see how these integrations work, you can check the [examples](examples/). Better documentation may be added in the future.\n\n(I am still figuring this out, so details are subject to change.)\n\n\u003c!--\n### Package Managers\n\n* A cppwinrt package is available in MSYS2: https://packages.msys2.org/base/mingw-w64-cppwinrt\n--\u003e\n\n### Building Upstream cppwinrt Directly\n\nIf you want to use the upstream cppwinrt tool directly and without build system integration, please refer to [Using Upstream cppwinrt](docs/using-upstream-cppwinrt.md).\n\n\n\u003c!--\nExamples\n--------\n\nExamples are provided in the [`examples/`](examples/) directory.\n--\u003e\n\n\nLicence\n-------\n\nAll code and resources in this repository are released under the MIT License,\nunless otherwise specified.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinhochun%2Fmingw-w64-cppwinrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvinhochun%2Fmingw-w64-cppwinrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvinhochun%2Fmingw-w64-cppwinrt/lists"}