Llizard

"where salamanders render"

plugin-based GUI framework written in pure C. renders with raylib directly to the framebuffer via DRM/KMS. communicates through redis. hosts and manages salamander plugins. the heart of the llizardOS experience.

technology stack

core framework

  • Language: C (C11 standard)
  • Graphics: raylib 5.0
  • UI Widgets: raygui
  • Display: DRM/KMS (direct rendering)

communication

  • IPC: Redis (localhost:6379)
  • Data Format: Key-value strings
  • Client: hiredis
  • Pub/Sub: Event notifications

architecture overview

llizard is the host application that manages the plugin lifecycle, handles input events, and orchestrates rendering. it provides a clean SDK for plugins to interact with the system.

┌─────────────────────────────────────────────┐
│         Llizard Core (llizard_main)         │
│  ┌───────────────────────────────────────┐  │
│  │      Plugin Manager (dlopen/dlsym)    │  │
│  │  - Load .so files from /plugins       │  │
│  │  - Resolve LlzPluginAPI symbols       │  │
│  │  - Lifecycle: init → update → render  │  │
│  └───────────────────────────────────────┘  │
│  ┌───────────────────────────────────────┐  │
│  │         Input Handler                 │  │
│  │  - Rotary encoder (knob)              │  │
│  │  - Buttons (play/pause, preset 1-4)   │  │
│  │  - Touch events (if available)        │  │
│  └───────────────────────────────────────┘  │
│  ┌───────────────────────────────────────┐  │
│  │      Renderer (raylib + DRM)          │  │
│  │  - Direct framebuffer access          │  │
│  │  - 60 FPS target                      │  │
│  │  - Double buffering                   │  │
│  └───────────────────────────────────────┘  │
└─────────────────────────────────────────────┘
                     │
                     │ llz_sdk API calls
                     │
        ┌────────────┼────────────┐
        │            │            │
        ▼            ▼            ▼
  Salamander 1  Salamander 2  Salamander 3
  media_player    spotify       snake.so
      .so         _clone.so
llizard uses DRM/KMS for graphics, bypassing X11 and Wayland entirely. this reduces latency and memory overhead significantly on embedded hardware.

llz_sdk modules

the llizard SDK provides modular access to system resources. plugins link against these libraries to interact with hardware and data.

llz_sdk_display

Screen dimensions, resolution, drawing primitives

llz_sdk_input

Knob rotation, button presses, touch coordinates

llz_sdk_media

Track info, playback state, album art, lyrics

llz_sdk_config

Plugin settings, user preferences, themes

llz_sdk_network

WiFi status, IP address, connectivity checks

llz_sdk_storage

Persistent data, cache management, file I/O

building llizard

desktop (development)

build for your local machine to develop and test plugins quickly.

bashbuild-desktop.sh
# Install dependencies (Debian/Ubuntu)
sudo apt install libraylib-dev libhiredis-dev

# Build llizard
make clean
make

# Run
./llizard

cross-compile (car thing)

cross-compile for ARMv7 using the llizardOS toolchain.

bashcross-compile.sh
# Set up cross-compiler
export CC=arm-linux-musleabihf-gcc
export CXX=arm-linux-musleabihf-g++

# Build for car thing
make PLATFORM=CARTHING clean
make PLATFORM=CARTHING

# Copy to device
scp llizard root@172.16.42.2:/usr/local/bin/
the desktop build uses X11 for graphics (raylib default). the car thing build uses DRM/KMS via the PLATFORM_DRM flag in raylib.

running llizard

on llizardOS, llizard runs as a runit service and starts automatically at boot. you can control it manually via:

bash
# Check status
sv status llizard

# Stop
sv stop llizard

# Start
sv start llizard

# Restart
sv restart llizard

# View logs
tail -f /var/log/llizard/current
view on githublearn about salamanders