Runnable SDL3 and GLFW examples for impeller-zig.
Install Zig 0.16.0 directly, or use mise to install the toolchain pinned by this repository:
mise installOnly is optional and provides shorter versions of the commands below.
Build both the API showcase and the shader example:
zig build
# or:
# only buildSDL3 is the default window backend:
zig build run
# or:
# only runRun the API showcase with GLFW instead:
zig build run -Dbackend=glfw
# or:
# only run glfwThe shader example always uses SDL3, with Vulkan on Linux and Windows or Metal on macOS:
zig build run-shader
# or:
# only run-shaderThe SDL3 Linux example forces the X11 video driver for now.
Cross compile with Zig's standard target option. For example, Linux to Windows:
zig build -Dtarget=x86_64-windows-gnuSupported Impeller SDK targets:
| Platform | -Dtarget |
|---|---|
| Linux x64 | x86_64-linux-gnu |
| Linux arm64 | aarch64-linux-gnu |
| macOS x64 | x86_64-macos |
| macOS arm64 | aarch64-macos |
| Windows x64 | x86_64-windows-gnu |
| Windows arm64 | aarch64-windows-gnu |
Cross-compilation depends on the window backend.
macOS targets require Apple's SDK/frameworks. GLFW currently cannot target Linux arm64 from a Linux x64 host.


