Guide

User guide

Learn Azul chapter by chapter, from the first window to the framework internals.

Getting Started

Application Architecture

Explains the concepts of architecting a larger Azul application

  • Understanding RefAny — RefAny helps you to share and store type-erased data between callbacks and threads
Read chapter →

Document Object Model

Node types, hierarchy, and CSS scoping

  • Reconciliation — Diffing, restyle scope, and damage-rect repaint
  • Datasets — Attaching state to a node for navigation and per-instance state
  • Merge Callbacks — How widgets keep heavy resources across a layout rebuild
  • Virtual Views — A node that materialises lazily, for infinite lists and embedded sub-DOMs
  • Components — Reusable UI fragments - named functions of (args) -> Dom
Read chapter →

Callbacks

What CallbackInfo exposes — state, DOM mutation, focus, async work

Read chapter →

Routing

URL patterns, route params, and per-route layout callbacks

Read chapter →

Styling with CSS

Stylesheets, selectors, and the cascade

  • CSS Properties — Reference of every CSS property azul recognises
  • System Themes — System colors, `@theme`, `@os`, and accessibility queries
  • Styling Text — Font family, size, weight, alignment, decoration, and the system font keywords
  • Icon Packs — Register icons and use them with `Dom::create_icon` or `<icon>`
Read chapter →

Layout

Overview of the layout solver

  • Simple Layout — Explains block formatting, sizing, positioning, the box model and how to handle overflowing content
  • Inline Layout — Text flow, word breaks, writing modes, multi-column
  • Flexbox — One-axis container layout with grow/shrink/basis
  • Grid — Two-axis container layout with tracks and areas
Read chapter →

Images

Loading raster images and CSS backgrounds

  • SVG — Parsing and rendering SVG documents
  • GL Canvas — Embedding an OpenGL canvas inside a Dom node
Read chapter →

Events

Callbacks, event filters, and how state triggers relayout

Read chapter →

Text Input

Editable text, IME, and the selection model

Read chapter →

Text Selection

Selection ranges, cursors, and copy/paste

Read chapter →

Timers

Timers, threads, and scheduled work

Read chapter →

Animations

CSS transitions and @keyframes

Read chapter →

Scrolling

Scroll containers, drag-and-drop, hit testing

Read chapter →

Windows, Menus, Decorations

Windows, menus, decorations, and per-window state

Read chapter →

Built-in Widgets

Built-in widgets and how to write your own

Read chapter →

Advanced

Debugging

Debug overlays, the inspector, and structured logging

Read chapter →

Profiling

Tracking allocations and per-frame budgets

Read chapter →

End-to-End Testing

Driving an Azul app from a script for tests

Read chapter →

XML Parsing (Standalone)

Loading a Dom from an XML string

Read chapter →

File Dialogs

Native open/save dialogs and folder pickers

Read chapter →

Maps (MapWidget)

A slippy map widget with pan/zoom, tap-to-pin hooks, and lat/lon projection

Read chapter →

Clipboard

Reading and writing the system clipboard

Read chapter →

Generating PDFs (HTML-to-PDF)

Render a styled Dom to PDF bytes - headless, no window, no file I/O

Read chapter →

Background Tasks

Running long jobs off the layout thread

Read chapter →

SQL Database (Db)

A bundled-SQLite handle - execute/query with typed value arrays

Read chapter →

Networking

HTTP from a callback

Read chapter →

Device Input (Sensors, Gamepad, Geolocation)

React to motion sensors, gamepads, and location as events - no polling

Read chapter →

Accessibility

Screen reader integration and ARIA roles

Read chapter →

Realtime Media and Devices

Camera/mic capture, audio playback, and streaming A/V frames to a peer (the azul-meet pattern)

Read chapter →

Mobile (iOS & Android) in Rust

Build, package, sign and install an Azul app as an .apk / .ipa — all Rust, from any OS, no Xcode or Android Studio

Read chapter →

Headless Rendering

Running the pipeline without a window

Read chapter →

Code Generation

How `azul-doc` regenerates bindings from `api.json`

Read chapter →

Deploying to the web

Run the same azul binary as a web app — how the WASM lift works and how to ship it

Read chapter →

Security Model

What azul does and doesn't defend against

Read chapter →

Contributors

Internals