The WinCore project develops a compatibility layer with Win32/WGL that allows compiling Windows programs written in C/C++ using the classic Win32 API to run on Linux and macOS. WinCore intercepts classic Win32 handlers and utilizes cross-platform backends for rendering via SDL3 or SDL2. The code is written in C++ and is distributed under the LGPLv3 license.
The project is the result of rethinking the LDL library by the same author, who concluded that instead of designing yet another API, it is more logical to take the proven procedural interface of the Win32 API and make it portable across different operating systems and devices. The idea is that code is written according to Win32 rules but is natively compiled and runs on Windows, Linux, and macOS.
The library is written in strict C++98 for maximum portability but exports clean C89 header files, ensuring backward compatibility and allowing easy bindings to Rust, Zig, Python, and other languages via C FFI. Currently, two backends—SDL2 and SDL3—have been added. There are plans to add backends for XLib and Wayland in the future.
The author does not aim to emulate all Windows capabilities and focuses only on subsystems for multimedia and engines. Currently, 5 functions from Kernel32.dll (module management, system time, and delays), 25 functions from User32.dll (window creation, message loops, cursor position, and input handling), 5 functions from Gdi32.dll (pixel format selection, bitmap output, and buffer swapping), and 4 functions from Opengl32.dll (creation, deletion, and activation of WGL contexts) have been implemented.


Source: opennet.ru
