Introduction
Makepad is a Rust framework for building native and web UIs with a GPU-accelerated rendering engine. It includes a live design language for styling and layout, enabling developers to see changes instantly without recompiling the application.
What Makepad Does
- Renders UIs at 120fps using GPU shaders on Metal, DirectX, OpenGL, and WebGL
- Provides a declarative live-design DSL for layout, styling, and animation
- Compiles to native desktop (macOS, Windows, Linux), mobile (iOS, Android), and web (WASM)
- Includes a built-in code editor component with syntax highlighting
- Supports hot-reloading of design files without application restart
Architecture Overview
Makepad uses a retained-mode widget tree combined with a GPU shader pipeline. The live-design language compiles to Rust structs at build time but reloads at runtime for instant preview. Drawing happens through a custom 2D renderer that batches draw calls and runs GLSL-like shaders translated to each platform's native shading language.
Self-Hosting & Configuration
- Requires Rust stable toolchain; install via rustup
- Add makepad as a cargo dependency or clone the monorepo
- Write UI in .rs files using the live_design! macro for layout and styling
- Target WASM with cargo makepad wasm or native with cargo run
- Customize themes by editing live-design tokens for colors, fonts, and spacing
Key Features
- GPU-accelerated rendering at 120fps across all platforms
- Live design reload without recompilation
- Single codebase for desktop, mobile, and web
- Built-in widgets: buttons, text inputs, sliders, scroll views, dock panels
- Shader-based animations defined alongside UI layout
Comparison with Similar Tools
- Iced — Elm-inspired Rust GUI; Makepad offers live design and GPU shaders
- egui — immediate-mode Rust GUI; Makepad is retained-mode with richer styling
- Tauri — wraps web tech in native shell; Makepad renders natively with no WebView
- Flutter — Dart-based cross-platform; Makepad is pure Rust with direct GPU access
FAQ
Q: Does Makepad support mobile? A: Yes. It compiles to native iOS and Android apps with the same codebase used for desktop and web.
Q: Can I use Makepad without the IDE? A: Yes. Makepad is primarily a UI framework. The IDE is one application built with it, not a requirement.
Q: How mature is Makepad? A: It is under active development. The rendering engine and widget set are stable, though the API may change between releases.
Q: What is the live-design language? A: A DSL embedded in Rust source files via macros. It defines layout, colors, fonts, and animations in a CSS-like syntax that reloads at runtime.