PAL is a lightweight, low-level, explicit cross-platform abstraction layer in C over platform and graphics APIs with support for modular builds and custom backends. PAL is stateless and transparent. Queries return current state, reflecting changes made through native API calls.
PAL supports Windows, Linux, Vulkan and D3D12. Both Wayland and X11 are supported on Linux.
PAL is released under the Zlib License.
PAL is written in C99 and uses Premake as its build system. PAL supports Windows Vista and later. PAL can be built with GCC, Clang and MSVC. Build options are configure with pal_config.lua. true to enable or false to disable a build option. It is recommended to not disable PAL_BUILD_ABI_DUMP build option.
X11 needs XRandR (1.2+) and libXcursor.
See below on how to generate project files for each compiler and toolset. PAL generates .vscode folder when generating GNU Make projects.
GNU Make (GCC):
premake\premake5.exe gmakeGNU Make (Clang):
premake\premake5.exe gmake --compiler=clangVisual Studio 2022 (MSVC)
premake\premake5.exe vs2022Visual Studio 2022 (Clang)
premake\premake5.exe vs2022 --compiler=clangVisual Studio 2026 (MSVC)
premake\premake5.exe vs2026Visual Studio 2026 (Clang)
premake\premake5.exe vs2026 --compiler=clangGNU Make (GCC):
./premake/premake5 gmakeGNU Make (Clang):
./premake/premake5 gmake --compiler=clangIf the ABI dump tool was enabled when geenrating the projects, build the project and run the command below to verify that your C99 compiler conforms to the PAL ABI. The command below use the release build. Replace Release with Debug if using debug build.
cd bin
cd Release
abi-dump.exe --quickcd bin
cd Release
./abi-dump --quickTo view additional commands, run the abi dump tool with --help.
PAL uses Doxygen for generating API documentation.
cd docs
doxygen doxyfileThe generated HTML docs will be available in docs/html/.
Contributions are welcome! Please open an issue or pull request.
See CONTRIBUTING.md for how and what to contribute.
Thanks for contributing to PAL.