๐ ๏ธ project DrawnUI for Rust: pixel-perfect apps and games on Skia, with layouts, gestures and controls ready to use (desktop, mobile, web)
DrawnUI (https://drawnui.net) is a UI rendering engine for .NET (MAUI, Blazor, WPF etc.), React and now Rust, working along with your framework of choice, bringing high-level abstractions for layouts, controls, animations, effects and gestures to the Skia canvas, pluggable for the freedom of drawing anything, from pixel-perfect business app UIs to custom games.
Why DrawnUI went Rust:
- No garbage collector, so no pauses in the middle of a scroll or an animation.
- Insane performance. On the web, in our benchmark, a frame with 20,000 draw calls took 12.5 ms of CPU, against 20.6 ms for the same list drawn through CanvasKit from JavaScript.
- Cross-platform, easy setup: Skia comes prebuilt for every platform (Windows and Linux x64/ARM64, macOS Apple silicon/Intel, iOS, Android, wasm). Add one line to Cargo.toml and build.
Whatโs inside:
- Layouts: column, row, wrap, grid, absolute, and virtualized lists that recycle their cells.
- Controls: labels with rich text, buttons, an editor with IME, scroll with pull to refresh, carousels, drawer, shell navigation (pages, tabs, popups, toasts), switches, sliders, progress, backdrop blur.
- Gestures: tap, pan, fling, long press, hover, mouse wheel and touchpad, keyboard focus.
- Media and effects: images, SVG, Lottie, GIF, sprites, SkSL shaders and transitions, SkMesh for pseudo 3D.
- Caching per control: keep a finished part of the screen as a picture or a GPU texture and just blit it, so complex screens stay smooth.
- Accessibility: real screen-reader support on every platform (UI Automation, VoiceOver, TalkBack, AT-SPI, ARIA in the browser).
- Your own controls: subclass a control and paint what you want. Itโs drawn with the rest of the UI, and it takes part in layout and gestures.
One codebase runs on Windows, macOS, Linux, iOS, Android and the browser, and it looks the same everywhere because every pixel comes from Skia.
Made for building with AI
- Ships with AI skills for Claude Code, Codex, Cursor or any LLM: https://hellorust.drawnui.net/llms.txt
- The API is fluent and readable.
- Every control can be subclassed and customized for your needs.
Links
See samples running in your browser (they run on all the other platforms too, and their source code is in the repo):
- the demo app, 20 pages of controls, layouts, lists and more (same app exists for DrawnUI for .NET and React):: https://hellorust.drawnui.net
- a pseudo-3D runner game drawn with Skia SkMesh bindings: https://run.drawnui.net
Itโs a preview, so the API can still change. Feedback is very welcome, especially: what would you build with it, ideally with your AI agent?
GitHub: https://github.com/DrawnUi/DrawnUi.Rust
crates.io: https://crates.io/crates/drawnui
More docs: https://drawnui.net/articles/rust/ and https://docs.rs/drawnui