A minimal portable API for embeddable GUIs. This is LADI repo, for upstream see https://github.com/lv2/pugl
  • C 70.5%
  • Objective-C 14.7%
  • C++ 7.5%
  • Meson 6.6%
  • M4 0.2%
  • Other 0.4%
Find a file
2026-03-21 16:00:18 +02:00
.reuse Dispatch configure events outside graphics context 2025-09-07 12:02:54 -04:00
bindings/cpp Fix C++ documentation errors 2025-09-07 23:26:34 -04:00
doc Fix C++ documentation errors 2025-09-07 23:26:34 -04:00
examples Dispatch configure events outside graphics context 2025-09-07 12:02:54 -04:00
include x11_cairo: optimise MIT-SHM path and add partial blit API 2026-03-21 15:13:26 +02:00
LICENSES Use 0BSD for trivial "public domain intent" things 2022-11-24 11:15:35 -05:00
meson/suppressions Fix strict MacOS build 2025-09-06 12:45:39 -04:00
resources Add rich clipboard support 2022-05-23 16:50:43 -04:00
scripts Replace duplicated dox_to_sphinx script with sphinxygen dependency 2023-01-20 15:53:52 -05:00
src x11_cairo.c: Add PUGL_PRETEND_NOXWAYLAND env var check so to force-enable MIT-SHM on XWayland 2026-03-21 16:00:18 +02:00
subprojects Make switch case order match enum order 2025-09-06 23:16:09 -04:00
test Dispatch configure events outside graphics context 2025-09-07 12:02:54 -04:00
.clang-format Update clang-format configuration 2025-02-07 15:41:18 -05:00
.clang-format-ignore Add clang-format-ignore file 2025-09-06 12:45:16 -04:00
.clang-tidy Clean up clang-tidy configuration 2025-09-05 17:38:39 -04:00
.clant.json Update clant configuration 2025-01-23 18:02:22 -05:00
.editorconfig Update editorconfig to apply to any Python file 2021-05-08 15:32:33 -04:00
.gitignore Build X11 cairo opengl-less libpugl.a with autotools 2025-10-27 01:30:02 +02:00
.gitlab-ci.yml Remove sanitize row on CI 2023-05-27 13:56:51 -04:00
.includes.imp Fix IWYU warnings 2022-04-23 21:19:22 -04:00
AUTHORS Windows: Use default cursor on window decoration 2020-10-17 00:14:56 +02:00
configure.ac Build X11 cairo opengl-less libpugl.a with autotools 2025-10-27 01:30:02 +02:00
COPYING Use 0BSD for trivial "public domain intent" things 2022-11-24 11:15:35 -05:00
Makefile.am autotools: extra dist for LICENSES/* 2025-11-08 20:40:48 +02:00
meson.build Merge branch 'main' into 'ladi' 2025-09-14 17:52:02 +03:00
meson_options.txt Merge branch 'main' into 'ladi' 2025-09-14 17:52:02 +03:00
README.md Build X11 cairo opengl-less libpugl.a with autotools 2025-10-27 01:30:02 +02:00

Pugl

Pugl (PlUgin Graphics Library) is a minimal portability layer for GUIs which is suitable for use in plugins and applications. It works on X11, MacOS, and Windows, and includes optional support for drawing with Vulkan, OpenGL, and Cairo.

This is LADI project variant of Nuklear. https://gitea.ladish.org/LADI/nuklear

LADI specific changes are:

  • mesonbuild changes related to submodule use in LADI projects (opengl-less X11)
  • autotools build of libnuklear.a (opengl-less X11)

Pugl is vaguely similar to libraries like GLUT and GLFW, but has different goals and priorities:

  • Minimal in scope, providing only a thin interface to isolate platform-specific details from applications.

  • Zero dependencies, aside from standard system libraries.

  • Support for embedding in native windows, for example as a plugin or component within a larger application that is not based on Pugl.

  • Explicit context and no static data, so that several instances can be used within a single program at once.

  • Consistent event-based API that makes dispatching in application or toolkit code easy with minimal boilerplate.

  • Suitable for both continuously rendering applications like games, and event-driven applications that only draw when necessary.

  • Well-integrated with windowing systems, with support for tracking and manipulating special window types, states, and styles.

  • Small, liberally licensed implementation that is suitable for vendoring and/or static linking. Pugl can be installed as a library, or used by simply copying the implementation into a project.

Stability

Pugl is currently being developed towards a long-term stable API. For the time being, however, the API may break occasionally. Please report any relevant feedback, or file feature requests, so that we can ensure that the released API will be stable for as long as possible.

Documentation

Pugl is a C library that includes C++ bindings. The reference documentation refers to the C API:

The documentation will also be built from the source if the docs configuration option is enabled, and both Doxygen and Sphinx are available.

The C++ documentation is currently a work in progress, for now you will have to refer to the examples or headers for guidance on using the C++ bindings.

Testing

Some unit tests are included, but unfortunately manual testing is still required. The tests and example programs are built by default. You can run all the tests at once via ninja:

meson setup build
cd build
ninja test

The examples directory contains several demonstration programs that can be used for manual testing.

-- David Robillard d@drobilla.net