RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
Getting started

1. Choose a package

Download from v0.14.4. Check the archive against SHA256SUMS, then unpack it.

Target Library archive
Linux x86-64 native; native-san for ASan + UBSan
Windows x86-64 windows-x86_64
macOS arm64 macos-arm64
WebAssembly wasm; wasm-eh for WebAssembly exception handling

2. Link the library

Package item Use
include/ Add to the include path. Use <rmgui/rmgui.h> or individual headers.
librmgui.a libckdl.a -lm Link after your objects, in that order.
rmgui.target Use compile_flags and consumer_link_flags for this target. For sokol, supply your own implementation and match the listed commit and shader variant.
ABI version Use matching headers and archive. Check rmgui_abi_version() == RMGUI_ABI_VERSION at startup.

3. Draw a frame

From the repository root, point package to the unpacked Linux archive:

package=/path/to/rmgui-0.14.4-native-febeb3f319b7
cc -std=c11 -I"$package/include" docs/examples/meters.c \
"$package/librmgui.a" "$package/libckdl.a" -lm -o meters
./meters > meters.rgba
magick -size 360x156 -depth 8 rgba:meters.rgba meters.png

The full sample is docs/examples/meters.c in the source checkout.

Three rounded meters drawn into an RGBA8 framebuffer
Who owns it Responsibilities
Host Pixels, windows, fonts and assets, input routing and presentation
RMGui Measure and arrange the UI, update element state, and paint into host memory
ImageMagick Optional conversion from raw example pixels to PNG

Next: four illustrated C examples or retained layout and damage.

Run the showcase

Package Open
showcase-linux-x86_64 rmgui-showcase-window (needs libX11)
showcase-windows-x86_64 rmgui-showcase-window.exe
showcase-macos-arm64 rmgui-showcase-window.app
showcase-web Serve the unpacked files together over HTTP, then open index.html.

See the showcase guide for pages, input and CLI capture.

Build the showcase source

Extract showcase-src beside the matching native package. From the showcase-source directory:

sh build.sh ../rmgui-0.14.4-native-febeb3f319b7
build/rmgui-showcase --help

This builds the headless CLI against installed headers and archives. CC, CFLAGS and LDFLAGS select a compatible profile. Build other hosts.