Prebuilt C++ libpag packages for HuxerUI. Each ZIP contains the native library, its public C++ headers, a CMake package, and metadata describing the upstream revision and rendering backend.
| Target | Backend | Package |
|---|---|---|
| windows-x86_64 | D3D12 with the upstream WARP fallback | MSVC Release and Debug DLLs and import libraries |
| linux-x86_64, linux-arm64 | EGL and OpenGL ES | Shared library |
| macos-x86_64, macos-arm64 | Metal | Static library, macOS 12 or later |
| ios-device-arm64, ios-simulator-arm64, ios-simulator-x86_64 | Metal | Static library, iOS 15 or later |
| android-arm64-v8a, android-x86_64 | OpenGL ES | Official 4.5.102 libraries, matching headers and Java runtime JAR |
| web-wasm32 | WebGL 2 | C++ static library and browser host runtime, Emscripten 4.0.19, single-threaded |
The native builds use the exact upstream revision in sources.json. Each Android package extracts the linked native libraries and Java runtime from the same checksum-verified upstream AAR. Link the SDK in CMake, add the Java runtime JAR to Gradle, and call PAG.SDKVersion() in the application to initialize libpag.
The Apple SDKs expose the C++ API and link Metal on macOS and iOS. The SDK public API is C++. The Web archive links into the application's Emscripten module.
Use Python 3.12 or later, Git, Git LFS, Node.js and CMake. Native builds use Ninja on Linux and Apple platforms. Windows uses Visual Studio 2026, the Windows SDK and CMake 4.2 or later. Install NASM or Yasm for x64 native builds. Linux needs EGL and GLES development headers. iOS builds need Xcode. Activate Emscripten 4.0.19 for Web. Preparing Android packages only needs Python and network access.
python build.py macos-arm64
python build.py ios-device-arm64
python build.py ios-simulator-arm64
python build.py windows-x86_64 --work D:/pag-build
python build.py android-arm64-v8a
python build.py web-wasm32Build Windows, Linux and macOS on the matching native architecture. The script syncs the locked upstream dependencies with depsync and writes the package to dist/. Use --source to reuse a checkout whose dependencies have already been synced. Use --work and --output to change the cache and output directories. For a local Windows SDK build, keep the work directory and any supplied checkout near a drive root because upstream's nested dependency build paths can exceed the MSVC path limit.
Extract the package and set HuxerPAG_DIR to its lib/cmake/HuxerPAG directory.
find_package(HuxerPAG CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE HuxerPAG::pag)The CMake target exposes platform link requirements. The Android package also exposes HuxerPAG_ANDROID_RUNTIME_JAR. Releases supply the same JAR as a separate asset for Gradle and record its checksum in PAGSDK.json. Desktop applications that use a shared build deploy the matching runtime library alongside the application.
The Windows CMake target selects the DLL with the matching MSVC C++ runtime. Use the Debug DLL with the Visual Studio development runtime and the Release DLL with Release, RelWithDebInfo or MinSizeRel applications.
Linux applications can set fallback fonts with pag::PAGFont::SetFallbackFontPaths() and a disk cache directory with pag::PAGDiskCache::SetCacheDir().
On Web, linking HuxerPAG::pag adds the browser host code to the application's Emscripten module. Create and activate a WebGL 2 context before creating PAG surfaces. The host script supplies browser fonts, path rasterization and image handling. Browser-backed PAG video also needs a video reader from the embedding application. The library uses Emscripten's default RTTI configuration for embind compatibility with the host application.
The release workflow links the installed package for each target. Desktop and Web tests render and read back a frame. Where a Metal device is available, the macOS test also imports a native texture as input and renders into a second Metal texture. iOS and Android packages are cross-linked in CI.