FerroUI is a cross-platform UI framework for Rust. It brings a complete control library, a styled property system with data binding, control themes for five design languages and a GPU composition renderer, and it runs on macOS, Windows, Linux, iOS, Android and in the browser from one code base. An interface is written declaratively in Rust: builders for every control, an rsx! macro, fine-grained signals in the manner of SolidJS and Leptos, and React-like components with hooks and a reconciler. It can also be written in XAML that is compiled to Rust when the application is built. Both drive the same controls, themes and bindings and can be mixed in one application.
Status: 0.5.0.
0.5.0is the current release on crates.io. It adds compiled{x:Bind}with compiled bindings by default, custom effects as runtime shaders on Skia and Vello, the portable media crates (video, camera and QR), WPF-style 3D (Viewport3Dand the Media3D scene model), experimental native renderers for macOS and Windows, smaller executables (theme trimming on by default, builds without unwinding), idiomatic Rust types under the .NET-named API, and faster starts and frames for large trees; the Designer Studio crates are published with it (CHANGELOG.md). The framework runs on macOS, Windows, Linux (X11, Wayland and the framebuffer), iOS, Android and in the browser. It was verified in continuous integration, in virtual machines, in the iOS simulator and on the Android emulator, not on a range of real devices. Within 0.5 the public API is kept; 0.6.0 may change it. See Project status.
The ControlCatalog sample with the WinUI 3 theme (ferroui-themes-winui), its default theme, on Windows 11 with the Mica backdrop. Text is shaped with HarfBuzz and drawn by Skia with the platform's text rendering settings: the contrast and gamma of ClearType on Windows, greyscale antialiasing on a high-density display, and colour emoji (docs/porting/text-rendering.md).
| Text on Windows | The same catalog on macOS |
|---|---|
![]() |
![]() |
- Declarative Rust UI, React-like.
ferroui-viewwrites user interfaces in plain Rust: builders generated for every control and anrsx!macro for the tree; fine-grained signals, memos and effects for state; function components with hooks (use_signal,use_effect,use_memo,use_context,use_future) and a reconciler that patches the controls when a component runs again; keyed lists, error boundaries, suspense and a router; hot reload and an inspector (below, compared with React). - Or in XAML, compiled. Markup is compiled to Rust source by the build script of a crate, with compiled bindings (
{x:Bind}) and themes trimmed to what an application uses; it can also be loaded at run time. Rust and XAML views interoperate. - A complete control library. Buttons, text input, items controls with virtualization, menus, pickers, calendar, navigation, pages, dialogs, the TreeDataGrid, charts, rich text, inking and media, with automation peers for the accessibility APIs of the platforms.
- Themes for five design languages. WinUI 3, Fluent, Material 3 Expressive, macOS 26 and Simple, for every control, with light and dark variants, on a styling system of selectors, styles, control themes, resources and transitions.
- GPU rendering. A compositor with a render loop on its own thread, dirty-region tracking, server-side visuals and composition animations, effects as shaders, and WPF-style 3D. Skia renders through Graphite on Metal, Ganesh on OpenGL, ANGLE, WebGL and Vulkan, or in software; an experimental Vello backend sits behind the same contracts; HarfBuzz shapes text.
- A full object model. Styled and direct properties with value priorities, inheritance, coercion and change notification; logical and visual trees; routed events; layout; input, focus and gestures.
- Data binding and MVVM. Compiled and reflection-style binding paths, converters, multi-bindings, data validation and templates, with ReactiveUI, DynamicData and Rx as crates of the workspace.
- Localization. ProTranslate supplies native translation bindings, live culture switching, RTL, calendars, region and measurement services, generated typed catalogs, 13 translation file formats and a portable catalog editing/AI workflow engine (guide).
- A visual designer. Designer Studio is a native designer built on the framework: an artboard with synchronized XAML, layers, editable properties, layout tools, preview stages, prototype flows and keyframe animation, on portable crates for lossless document editing, history, language services and collaboration. Run
cargo run -p designer-studio. - Developer tools. F12 opens the developer tools on a running application: its trees, the properties of a control and where their values come from, its layout and styles, and the routed events.
- Small and measured. Themes and type tables are trimmed to what an application uses, shipped builds abort instead of unwinding, and frame cost, start time and size are held by a local performance gate (binary size, performance notes).
- Safe Rust. The controls, markup, XAML and theme crates contain no
unsafecode. It is confined to a small part of the object model core and to the rendering, text shaping, platform and interop backends.
The state per subsystem is tracked in docs/porting/CRITICAL-PATH.md. The checks that still need real hardware or a person at the screen are listed in docs/porting/manual-verification.md. How the framework relates to the projects it grew from, member by member, is in Origins.
| Area | State |
|---|---|
| Property system, trees, layout, input, styling, resources | Complete, with the test suites of the model it follows |
| Data binding, animation, transitions | Complete |
| Media, text layout, fonts | Complete |
| Portable video, camera and shared textures | Initial modular FerroUI.Media implementation: shared frame leases, Apple and browser providers; remaining native providers and release gates are unfinished |
| Compositor and render loop | Complete, including composition animations, custom visuals and the import of external GPU objects; the render loop runs on its own thread on the desktop |
| Controls | The control set, including items controls, text input, menus, pickers, calendar, pages, the colour picker, the managed dialogs and automation peers |
| XAML | The run-time loader with its test suites, and compilation of markup to Rust source in build scripts (used by the themes, the dialogs and the ControlCatalog sample); hot reload and parts of the build integration are open |
| Themes | Android Material 3 Expressive, macOS 26, Fluent, Simple and WinUI 3, for every control (WinUI 3: progress, deviations, comparison with native WinUI 3) |
| Skia and HarfBuzz backends | Complete; Skia is the default and reference renderer |
| Developer tools | ferroui-diagnostics, attached with F12, with the TreeDataGrid as the property grid |
| Behaviors | The object model of Xaml.Behaviors, the classic triggers and actions, about 330 custom behaviors, events, drag and drop, responsive classes and animations (ferroui-xaml-behaviors, plan and progress) |
| Vello backend | Experimental: CPU, hybrid and GPU modes, measured against Skia; open work in vello-backend.md, section 13 |
| Platform | What works | Verified |
|---|---|---|
| macOS | Windows, input, input methods, clipboard, drag and drop, menus, tray icon, storage pickers, native control host, accessibility; Metal (default), OpenGL (with Skia built with --cfg ferro_skia_apple_ganesh) and software rendering |
CI and the development machine; the storage pickers and a screen reader not exercised |
| Windows | Windows, input, input methods and the input pane, clipboard and drag and drop over OLE, file dialogs, tray icon, native control host, extended client area, UI Automation; rendering in software, through ANGLE, WGL, DirectComposition, Windows.UI.Composition (with blur, acrylic and Mica) and a DXGI swap chain; Vulkan behind the feature vulkan |
CI (x64 and ARM64) and a Windows 11 ARM64 virtual machine; screen readers and the look of acrylic and Mica on a real desktop not verified |
WinUI 3 hosting (ferroui-winui) |
The content in a swap chain panel of a WinUI 3 window, with input, text input, cursors, drag and drop and automation | The smoke run of its sample (rendering, the automation tree, closing) in a virtual machine; input, drag and drop and a UI Automation client not verified |
| Linux, X11 | Windows, input, input methods (XIM, IBus, Fcitx), clipboard, drag and drop, desktop portals, GTK file dialogs, menus and tray icon over D-Bus, session management, native control host, accessibility over AT-SPI; rendering in software, through GLX, EGL and Vulkan | CI under Xvfb and an Ubuntu virtual machine; no screen reader |
| Linux, Wayland | Opt-in, as upstream (platform detection chooses X11): toplevels with server-side or drawn decorations, popups, pointer, keyboard, touch and text input, clipboard and drag and drop, fractional scaling; rendering through shared memory, EGL or a dmabuf swap chain | CI under headless sway and a virtual machine (sway, headless Mutter); a desktop compositor with input and the dmabuf swap chain on a GPU not verified |
| Linux framebuffer | One full-screen view on /dev/fb0 (software) or on a KMS output (OpenGL through EGL on GBM), with input through libinput or the event devices |
Virtual devices only (vkms, uinput) in CI and a virtual machine; not on a board |
| iOS | A view over Metal or OpenGL ES, touch, keyboard and text input, clipboard, storage, native control host, accessibility | The simulator; no signed device build, no VoiceOver |
| Android | A view over EGL, software or Vulkan (feature vulkan), touch, keyboard and the input method, lifecycle, clipboard, storage, native control host, accessibility; builds with stable Rust |
The emulator (API 36); no device, no TalkBack |
| Browser (WebAssembly) | A view in a web page, rendered with WebGL 2 or a 2D canvas, input, clipboard, storage, native control host; an opt-in build renders from a worker thread | Headless Chrome in CI; other browsers not verified |
| Headless | Windows without a screen for tests, and a VNC server (ferroui-headless-vnc) to see and drive an application remotely |
Tests; the VNC server with a test client, not with real viewers |
- Rust 1.89 or later (the browser needs 1.93 or later).
- Python 3 for the maintenance scripts (not needed to build).
- The first build downloads a prebuilt Skia for the target, or builds it from source where no prebuilt binary matches (Vulkan on Windows), and builds HarfBuzz from source with a C++ compiler; it can take a while.
Per platform:
| Platform | Needs | Details |
|---|---|---|
| macOS | macOS 11 or later and the Xcode command line tools (the platform compiles an Objective-C++ library) | apple-opengl.md for the OpenGL configuration |
| Windows | x64 or ARM64, the MSVC build tools; libclang for ANGLE (the default feature angle); the feature vulkan builds Skia from source. Hosting in WinUI 3 needs the Windows App SDK 1.6 runtime and its bootstrap library beside the executable |
win32-platform.md, winui.md |
| Linux | The development packages of fontconfig and FreeType; the system libraries (Xlib, GTK, GLib, EGL, Vulkan, libwayland-client, libxkbcommon, libinput, libdrm, libgbm) are opened at run time, none is linked |
x11-platform.md, wayland-platform.md, linux-framebuffer-platform.md |
| iOS | Xcode with the iOS SDK and the targets aarch64-apple-ios and aarch64-apple-ios-sim; an application is bundled without an Xcode project (scripts/ios/bundle.sh) |
ios-platform.md |
| Android | The Android SDK and NDK, stable Rust with the target aarch64-linux-android, API level 26 or later; packaged without Gradle (scripts/android/apk.sh) |
android-platform.md |
| Browser | The target wasm32-unknown-emscripten, Emscripten and the pinned wasm-bindgen command-line tool (scripts/browser/setup.sh installs them); the opt-in build with threads also needs the pinned nightly toolchain |
browser-platform.md |
FerroUI is a set of crates that are released together at one version. A desktop application names the base library, the controls, the desktop entry point and a theme:
[dependencies]
ferroui-base = "=0.5.0"
ferroui-controls = "=0.5.0"
ferroui-desktop = "=0.5.0"
ferroui-themes-fluent = "=0.5.0"The WinUI 3 theme is the crate ferroui-themes-winui (WinUITheme), used in place of ferroui-themes-fluent or beside it; the facade crate has it as the feature winui-theme.
The Android Material 3 Expressive theme is ferroui-themes-material (MaterialTheme),
available through the facade's material-theme feature. Add .with_material_fonts()
to the application builder for bundled Roboto, then add MaterialTheme::new().as_style()
to the application styles. It provides light/dark color schemes, HCT dynamic palettes,
Material component templates, spring motion, bounded ripples and reduced-motion support.
See the implementation and fidelity guide.
Run the gallery with cargo run -p material-theme-gallery --bin material-theme-gallery.
An application can also name one dependency instead: the facade crate ferroui. It re-exports the common crates under short names (ferroui::base, ferroui::controls, ...) with a prelude of the types of a minimal application; its default features are the desktop platforms and the Fluent theme, and further features add the Simple theme, XAML loading at run time, the colour picker, Charts, the TreeDataGrid, the dialogs, the browser platform, the WinUI 3 theme, the Vello backend, the headless platform and the graphics contracts (docs/release.md, section 2.1). In the repository it is used already: cargo run -p ferroui --example hello.
The libraries for MVVM applications (Rx, DynamicData, ReactiveUI and their integration with the controls) are crates of the release as well: ferroui-reactiveui-controls = "=0.5.0" beside the crates above, or the facade crate with its feature reactiveui (docs/mvvm.md).
The declarative API (ferroui-view with ferroui-view-macros, docs/declarative-ui.md) and the developer tools (ferroui-diagnostics) are crates of the release too: ferroui-view = "=0.5.0" and ferroui-diagnostics = "=0.5.0" beside the crates above (the facade has the developer tools as its feature diagnostics).
The crates of a release depend on one another at exactly its version, so name the same version for every FerroUI crate, as above. 0.1.0 followed four previews (0.1.0-preview.1 to 0.1.0-preview.4), pre-releases in the sense of semantic versioning, which Cargo selects only when they are named, 0.2.0, 0.3.0, 0.4.0 and 0.5.0 are the next minor versions, and 0.3.0 and 0.4.0 each followed one preview (0.3.0-preview.1, 0.4.0-preview.1). The work towards the next version is published as previews of it; the previews of 0.5.1 (0.5.1-preview.1, ...) keep the public API of 0.5, and a preview of a later minor version may change any part of it. The release process is described in docs/release.md and the changes of each release in CHANGELOG.md.
The platforms that are not part of platform detection are named by their own crates beside the others: ferroui-wayland, ferroui-linuxframebuffer, ferroui-ios, ferroui-android, ferroui-browser, ferroui-winui and ferroui-headless-vnc.
Markup is loaded at run time with ferroui-markup-xaml-loader (the feature xaml of the facade), or compiled by the build script of the application with ferroui-build (a build dependency) against ferroui-markup-xaml. The code the markup compiler writes names the crates it calls by their own names, so an application that compiles its markup depends on those crates directly, beside or instead of the facade.
Core
| Crate | Description | Version | Downloads | Documentation |
|---|---|---|---|---|
ferroui-protranslate-core |
Framework-independent translation, culture and globalization services for FerroUI | |||
ferroui-protranslate-formats |
Loss-aware localization catalog import and export for ProTranslate | |||
ferroui-system |
The parts of the .NET base class library that FerroUI and its reusable libraries share: thread-local variables for every target, events, property and collection change notification, cancellation | |||
ferroui-base |
The base library of FerroUI: the property system, layout, input, styling, media, text, animation, data binding and the compositor | |||
ferroui-media |
Shared frame, event and renderer-host contracts for portable media | |||
ferroui-media-camera |
Portable camera discovery, capture sessions and owned photos | |||
ferroui-media-qr |
Optional offline QR analysis of shared camera frames | |||
ferroui-media-video |
Portable video playback sources, players and playback sessions | |||
ferroui-reactive |
A port of Rx.NET (System.Reactive) for FerroUI: observable sequences, their operators, schedulers, disposables and subjects, independent of the user interface | |||
ferroui-dynamic-data |
A port of DynamicData for FerroUI: reactive collections, change sets, observable caches and lists with their operators, independent of the user interface | |||
ferroui-reactive-testing |
A port of Microsoft.Reactive.Testing for ferroui-reactive: the virtual-time test scheduler, recorded notifications, hot and cold test observables and their assertions | |||
ferroui-splat |
A port of Splat for FerroUI: the service locator with its dependency resolvers, logging, mode detection, feature usage tracking and the application builder, independent of the user interface | |||
ferroui-dependency-injection |
Microsoft.Extensions.DependencyInjection for Rust: thread-local services, scopes, keyed resolution and constructor factories, independent of the user interface | |||
ferroui-reactiveui |
A port of ReactiveUI for FerroUI, in its System.Reactive flavour with the run time of ReactiveUI.Binding: reactive objects, commands, property observation, bindings, view location, activation and routing for MVVM, independent of the user interface | |||
ferroui-reactiveui-testing |
A port of ReactiveUI.Testing for ferroui-reactiveui: running code with test schedulers, the builders of test data and the helpers of tests of view models | |||
ferroui-media3d |
WPF-style 3D for FerroUI: the Media3D values, and the scene model of Viewport3D | |||
ferroui |
FerroUI in one dependency: the facade crate that re-exports the common crates under short names, with a prelude and features that choose the platform, the theme and the backends |
Controls and themes
| Crate | Description | Version | Downloads | Documentation |
|---|---|---|---|---|
ferroui-static-view-locator-macros |
The attributes #[static_view_locator] and #[static_view_mapping] of ferroui-static-view-locator | |||
ferroui-livecharts |
LiveCharts2 chart calculation, geometry, interaction and animation for FerroUI | |||
ferroui-controls |
The controls of FerroUI: the application model, top levels, the control set and automation peers | |||
ferroui-fonts-inter |
The Inter font family as an embedded font collection of FerroUI | |||
ferroui-media-controls |
Composited shared-texture presenters for FerroUI | |||
ferroui-media-camera-controls |
Portable composited camera preview, independently of video controls | |||
ferroui-media-video-controls |
Composited video presentation and accessible playback controls | |||
ferroui-reactiveui-controls |
The integration of ReactiveUI with FerroUI: the scheduler of the dispatcher, property observation and command binding for FerroUI objects, activation, the reactive views and view hosts, the data-template hook, suspension and use_reactive_ui on the application builder | |||
ferroui-static-view-locator |
View locators generated at build time for FerroUI: view models mapped to views by naming convention, contracts and explicit mappings, without reflection | |||
ferroui-treedatagrid-core |
The framework-neutral part of FerroUI's TreeDataGrid: flat and hierarchical sources, columns, rows, sorting, expansion, and row and cell selection | |||
ferroui-view-macros |
The rsx! and #[component] macros of ferroui-view, the declarative Rust API of FerroUI | |||
ferroui-xaml-behaviors-animations |
Reusable animations of the FerroUI behaviors: key-frame animation factories and runners, composition animation catalogs (entrance, exit, attention and motion presets), fade, scale, rotate, slide, tilt, orbit and parallax effects, the selection indicator animation and transition helpers | |||
ferroui-controls-charts |
Native FerroUI charts: line, area and bar series, category and calendar axes, legends, markers and labels | |||
ferroui-controls-livecharts |
Native FerroUI chart controls using the LiveCharts2 Rust chart engines | |||
ferroui-controls-repeater |
The ItemsRepeater of FerroUI, a port of the Repeater of WinUI: virtualizing stack, uniform grid, flow and lined-flow layouts, element factories, recycling, phasing, transitions and selection | |||
ferroui-dialogs |
The managed dialogs of FerroUI: the managed file chooser, the managed storage provider and the about dialog | |||
ferroui-protranslate |
Native FerroUI bindings, attached properties and XAML extensions for ProTranslate localization | |||
ferroui-themes-fluent |
The FerroUI Fluent theme: control themes, colour palettes and resources for the control set, in light and dark variants | |||
ferroui-controls-treedatagrid |
The TreeDataGrid control of FerroUI: hierarchical and tabular data in one virtualizing view, with sorting, selection, editing, drag and drop and its control themes | |||
ferroui-themes-macos |
The FerroUI macOS 26 theme: compiled control templates, semantic materials and accessible motion | |||
ferroui-themes-material |
Android Material 3 Expressive theme for FerroUI with compiled XAML, light and dark color schemes, expressive motion and touch-first control templates | |||
ferroui-themes-simple |
The FerroUI Simple theme: control themes and resources for the control set, in light and dark variants | |||
ferroui-controls-color-picker |
The colour picker library of FerroUI: ColorPicker, ColorView, ColorSpectrum, ColorSlider, ColorPreviewer, the colour palettes and their control themes | |||
ferroui-devtools |
Opt-in Chrome DevTools Protocol target for FerroUI applications | |||
ferroui-themes-winui |
The FerroUI WinUI theme: the control styles, templates and theme resources of WinUI 3, in light, dark and high contrast variants | |||
ferroui-diagnostics |
The developer tools of FerroUI: the logical and visual trees, the properties and their value sources, routed events, the layout explorer and screenshots of a running application | |||
ferroui-controls-inking |
The inking controls of FerroUI, a port of WinUI's: InkCanvas, the InkPresenter services, stencils, custom drying, InkToolbar with its WinUI theme, the portable ink format and the clipboard, and the ink services of Windows | |||
ferroui-view |
A declarative Rust API for FerroUI user interfaces without XAML: element builders generated for every control, an rsx! macro, signals that properties follow, components that run again with hooks and a reconciler | |||
ferroui-xaml-interactivity |
The behaviors object model of FerroUI: attached behavior collections, behaviors, triggers and actions on objects and styled elements, their lifecycle, and the templates that let styles set them | |||
ferroui-xaml-interactions |
The classic triggers and actions of the FerroUI behaviors: event, data and timer triggers, property, method and command actions, clipboard actions and storage pickers | |||
ferroui-xaml-interactions-custom |
The custom behaviors, triggers and actions of FerroUI: about 330 behaviors for specific controls, input, focus, validation, commands, windows, dialogs and services | |||
ferroui-xaml-interactions-draganddrop |
Drag and drop behaviors of FerroUI: dragging context data, typed data, panels and files between controls and with the system, drop targets with handlers and commands, file and text drops, tree view drop handling, and an in-process managed drag with a preview window | |||
ferroui-xaml-interactions-draggable |
Draggable behaviors of FerroUI: moving elements in a canvas, in a grid or by a translation, reordering the items of an items control with an optional placeholder, scrolling a scroll viewer while dragging, and the styles that make tab controls, list boxes, canvases and grids draggable | |||
ferroui-xaml-interactions-events |
Behaviors and triggers of the input events of FerroUI: a trigger and an abstract behavior per pointer, key, focus, gesture, text input and drag-and-drop routed event | |||
ferroui-xaml-interactions-reactiveui |
The ReactiveUI behaviors of FerroUI: actions that navigate a ReactiveUI router (navigate, navigate back, navigate and reset, clear the stack, navigate to a view model the service locator resolves) and the trigger that runs its actions when a ReactiveUI interaction is handled | |||
ferroui-xaml-interactions-responsive |
Responsive behaviors of FerroUI: style classes switched by the width, the height and the aspect ratio of a control | |||
ferroui-xaml-behaviors |
The behaviors, triggers and actions of FerroUI in one crate: the object model, the classic interactions, the custom behaviors, events, drag and drop, responsive classes and animations, each behind a feature |
Markup and build
| Crate | Description | Version | Downloads | Documentation |
|---|---|---|---|---|
ferroui-build-scan |
The build-time type model of FerroUI and the source scanner that fills it: what a build script exports of a crate, linking nothing of the framework | |||
ferroui-static-view-locator-build |
The generator of ferroui-static-view-locator: the build-script part that maps the view models of a crate to its views and writes the locators | |||
ferroui-protranslate-build |
Deterministic typed translation catalog generation and localization diagnostics for FerroUI | |||
ferroui-markup |
The markup support of FerroUI: binding path parsing and reflection-style bindings | |||
ferroui-markup-xaml |
The FerroUI XAML runtime library: markup extensions, templates, includes, converters and the runtime helpers of compiled XAML | |||
xamlx |
Rust port of the backend-independent part of XamlX (XAML compiler library) | |||
ferroui-markup-xaml-loader |
The FerroUI XAML language definition and compiler extensions built on xamlx | |||
ferroui-build |
Build-script support of FerroUI: compiles the markup documents of a crate to Rust source and embeds its assets | |||
ferroui-markup-xaml-winui |
WinUI XAML compatibility of FerroUI: an opt-in importer from WinUI XAML and its run-time loading entry points |
Render backends and text
| Crate | Description | Version | Downloads | Documentation |
|---|---|---|---|---|
ferroui-pretext-contracts |
Backend contracts for prepared text and glyph output | |||
ferroui-pretext |
Reusable text preparation, Unicode wrapping and rich inline layout | |||
ferroui-pretext-layout |
Platform-neutral wrap metrics and obstacle-aware column flow for prepared text | |||
ferroui-metal |
The Metal platform contracts of FerroUI: the device, the surface of a top-level and the import of external objects | |||
ferroui-pretext-media |
FerroUI font and shaping services for prepared text | |||
ferroui-harfbuzz |
The HarfBuzz text shaping backend of FerroUI | |||
ferroui-direct2d |
Windows system GPU rendering and text with Direct2D, Direct3D 11, DirectWrite and WIC | |||
ferroui-opengl |
The OpenGL platform contracts of FerroUI: contexts, surfaces and the entry points the framework itself uses | |||
ferroui-quartz |
Apple native renderer using Metal, Core Graphics, Core Text and ImageIO on macOS and iOS | |||
ferroui-render3d |
The renderer of FerroUI's 3D scenes: the CPU reference rasterizer, the shader and the wgpu executor, the shared uniform layouts and the output cache of Viewport3D | |||
ferroui-vulkan |
The Vulkan platform contracts of FerroUI: the instance, the device, the graphics context, the swap chain render target of a surface and the import of external objects | |||
ferroui-skia |
The Skia render backend of FerroUI: Graphite on Metal, Ganesh on WebGL and raster | |||
ferroui-vello |
The Vello render backend: the render contracts of the base library on kurbo, peniko and the renderers of the Vello project |
Platforms
| Crate | Description | Version | Downloads | Documentation |
|---|---|---|---|---|
ferroui-microcom |
The COM-style interop runtime of FerroUI, which its native platform backend is built on | |||
ferroui-freedesktop |
The FreeDesktop services of FerroUI for Linux desktops: D-Bus input methods, portals, menus, tray icons and accessibility over AT-SPI | |||
ferroui-media-opengl |
Render-thread immutable native GL frame production and presentation | |||
ferroui-media-apple |
CoreVideo ownership and IOSurface imports shared by media producers | |||
ferroui-media-camera-apple |
AVFoundation camera capture with shared CoreVideo frames | |||
ferroui-media-linux |
GStreamer DMA-BUF sessions and native EGL frame ownership | |||
ferroui-media-camera-linux |
Portal PipeWire and explicit V4L2 camera profiles | |||
ferroui-media-metal |
Independent Metal texture production and renderer-host encoding on the active device | |||
ferroui-media-qr-apple |
Optional offline Vision QR recognition of retained CoreVideo frames | |||
ferroui-media-video-apple |
AVFoundation video playback with shared CoreVideo frames | |||
ferroui-media-video-linux |
GStreamer native audio and video playback | |||
ferroui-android |
The Android platform of FerroUI: a view in an activity, rendered through EGL or to the native window | |||
ferroui-media-android |
Shared Android SurfaceTexture frame production without preview readback | |||
ferroui-media-camera-android |
CameraX photo and silent video capture with shared Android GPU preview | |||
ferroui-media-qr-android |
Optional bundled offline Android QR analysis of CameraX images | |||
ferroui-media-video-android |
Android native playback and audio with shared GPU frame output | |||
ferroui-native |
The macOS platform of FerroUI: windows, input, clipboard, drag and drop, menus and Metal and OpenGL graphics over a native library | |||
ferroui-headless |
The headless platform of FerroUI: windows without a screen, driven by simulated input, for tests | |||
ferroui-headless-vnc |
The VNC server of the headless platform of FerroUI: an application runs without a screen and is seen and driven through a VNC viewer | |||
ferroui-ios |
The iOS platform of FerroUI: a UIKit view, touch input and Metal and OpenGL ES graphics | |||
ferroui-linuxframebuffer |
The Linux framebuffer platform of FerroUI: one full-screen top-level on a framebuffer device or a KMS output, with input from the kernel's input devices | |||
ferroui-browser |
The browser platform of FerroUI: a top-level in an element of a web page, rendered with WebGL or to a 2D canvas | |||
ferroui-media-browser |
Page-owned WebGL frame storage and direct texture presentation | |||
ferroui-media-camera-browser |
Explicit browser camera acquisition and shared WebGL preview | |||
ferroui-media-video-browser |
Native browser playback with shared WebGL frame output | |||
ferroui-win32 |
The Windows platform backend: windows, the message loop, input, screens and the software surface over the Win32 API | |||
ferroui-media-windows |
Media Foundation DXGI storage and compatible ANGLE device interop | |||
ferroui-media-camera-windows |
Explicit Media Foundation camera acquisition and JPEG snapshots | |||
ferroui-media-video-windows |
Media Foundation playback with native WASAPI audio timing | |||
ferroui-winui |
FerroUI content inside a WinUI 3 (Windows App SDK) application: a swap chain panel with pointer, keyboard and text input, cursors, drag and drop and automation | |||
ferroui-x11 |
The X11 windowing platform of FerroUI for Linux | |||
ferroui-desktop |
The desktop entry point of FerroUI: platform detection with the default render and text shaping backends | |||
ferroui-wayland |
The Wayland platform of FerroUI for Linux: toplevels and popups over xdg-shell, pointer, keyboard, touch and text input, clipboard and drag and drop, rendered through shared memory, EGL or a dmabuf swap chain |
Tools and designer support
| Crate | Description | Version | Downloads | Documentation |
|---|---|---|---|---|
ferroui-designer-core |
Source-preserving XAML document, syntax, transactions and history for FerroUI visual designers | |||
ferroui-designer-animation |
Portable timeline authoring, deterministic animation sampling and XAML animation interchange for FerroUI designers | |||
ferroui-designer-collaboration |
Transport-independent replicated XAML designer model, synchronization and presence | |||
ferroui-designer-project |
Portable FerroUI solution discovery, document buffers, resource URIs and cancellable build tasks | |||
ferroui-designer-language |
XAML language services and stdio language server for FerroUI visual designers | |||
ferroui-designer-tools |
Portable panel layout adapters, property metadata, selection geometry and manipulation plans for FerroUI designers | |||
ferroui-hot-patch |
Development-only FerroUI hot-patch support | |||
ferroui-protranslate-studio |
Portable localization catalog editing, persistence and AI translation workflow | |||
ferroui-remote-protocol |
The remote protocol of FerroUI: the messages of the previewer and of remote rendering, their BSON serialization and the transports that carry them | |||
microcom-codegen |
Code generator of the FerroUI interop runtime: a C++ header and Rust bindings from an interface definition file | |||
ferroui-hot-reload |
Development-only FerroUI hot-reload support | |||
ferroui-inspect |
Opt-in application inspection core for FerroUI, shared by its MCP server and its Chrome DevTools Protocol endpoint | |||
ferroui-mcp |
Opt-in application inspection MCP server for FerroUI | |||
ferroui-designer-collaboration-host |
Durable authenticated designer rooms, reconnecting clients and an MCP collaboration service | |||
ferroui-designer-support |
Designer support of FerroUI: the loader of the previewed window and the previewer that talks to an IDE over the remote protocol | |||
ferroui-designer |
Embeddable FerroUI visual XAML designer with native workspace, transactional preview and timeline |
The native on-screen keyboard is included as the self-contained FerroBoard component, with a compiled test page in ControlCatalog under Text → FerroBoard.
Clone the repository and build the workspace:
git clone https://github.com/wieslawsoltes/FerroUI.git
cd FerroUI
cargo build --workspaceRun the examples:
# A minimal application through the facade crate and its prelude, with the Fluent theme
cargo run -p ferroui --example hello
# The same with the crates named one by one
cargo run -p ferroui-desktop --example hello_window
# Themed controls, Simple theme (add -- --fluent for the Fluent theme)
cargo run -p ferroui-themes-simple --example themed_window
# Hello, World! in the WinUI 3 theme, in XAML (samples/HelloWorld), and in each style of the
# declarative Rust API: builders, rsx!, a component with hooks, a component in XAML
cargo run -p hello-world
cargo run -p hello-world-builders
cargo run -p hello-world-macros
cargo run -p hello-world-hooks
cargo run -p hello-world-component-host
# The ControlCatalog sample application
cargo run -p control-catalog-desktop
# The TreeDataGrid demo (its pages are also the page TreeDataGrid of the ControlCatalog)
cargo run -p treedatagrid-demo
# The custom effects gallery: the effects of the library on Visual.Effect, one section per
# family (its sections are also the pages of the section Custom effects of the ControlCatalog)
cargo run -p custom-effects
# Charts: compiled XAML, line/area/bar series, shared live data and light/dark resources
cargo run -p charts-demo --features desktop
# LiveCharts: Cartesian and pie charts of the LiveCharts2 port, compiled XAML and live data
cargo run -p livecharts-demo --features desktop --bin livecharts-demo
# ReactiveDemo, the getting-started sample of ReactiveUI: a crates.io browser on the WinUI 3
# theme (add --no-default-features to search an in-memory catalogue instead of crates.io)
cargo run -p reactive-demo
# The example of the ReactiveUI integration, with a DynamicData page, on the WinUI 3 theme
cargo run -p reactiveui-example
# The gallery of the WinUI theme (its capture mode and its comparison with WinUI 3 on Windows:
# docs/porting/winui-theme-gallery.md)
cargo run -p winui-theme-gallery --bin winui-theme-galleryThe ControlCatalog runs on the other platforms too: on Linux it takes the Wayland backend when a compositor is reachable, as the original sample does (FERROUI_CATALOG_WAYLAND=0 keeps X11), on the framebuffer with --fbdev or --drm, and on the headless platform behind a VNC server with --vnc; in the browser through scripts/build-browser.sh control-catalog-browser; on iOS through scripts/ios/sim-catalog.sh and on Android through scripts/android/emu-catalog.sh. The platform documents under docs/porting have the details.
Run the tests:
cargo test --workspaceAn application is a class derived from Application that creates its main window when the framework has finished initialising. With the facade crate everything it names comes from ferroui::prelude:
use ferroui::prelude::*;
use std::rc::Rc;
#[repr(C)]
pub struct App {
base: Application,
}
ferro_class!(App: Application);
ferro_impl_classes!(App: FerroObjectImpl);
impl NewApplication for App {
fn new_application() -> Ref<Self> {
instantiate(Self { base: Application::construct() })
}
}
impl ApplicationImpl for App {
fn initialize(this: &Self) {
Self::parent_initialize(this);
this.styles().add(FluentTheme::new().as_style());
}
fn on_framework_initialization_completed(this: &Self) {
let lifetime = this.application_lifetime();
if let Some(desktop) =
lifetime.as_ref().and_then(|lifetime| lifetime.as_classic_desktop_style_application_lifetime())
{
desktop.set_main_window(Some(create_main_window()));
}
Self::parent_on_framework_initialization_completed(this);
}
}
fn create_main_window() -> Ref<Window> {
let text = TextBlock::new();
text.set_text(Some("Hello from FerroUI"));
text.set_font_size(24.0);
let button = Button::new();
button.set_content(Some(Rc::new("Click me".to_string())));
button.click(|_, _| println!("Button clicked"));
let panel = StackPanel::new();
panel.set_spacing(12.0);
panel.children().add(text);
panel.children().add(button);
let window = Window::new();
window.set_title(Some("Hello".to_string()));
window.set_content(Some(Control::boxed(panel)));
window
}
fn main() -> std::process::ExitCode {
let args: Vec<String> = std::env::args().skip(1).collect();
let exit_code = AppBuilder::configure::<App>()
.use_platform_detect()
.start_with_classic_desktop_lifetime(&args);
std::process::ExitCode::from(exit_code as u8)
}The complete programs are hello.rs (the facade) and hello_window.rs (the crates one by one). The API is still changing; those examples are kept building and are the authoritative reference.
ferroui-view writes user interfaces in Rust, on the same controls, themes, styles and bindings as markup. A component can run once and let its properties follow signals (the model of SolidJS and Leptos), or run again when its state changes and let a reconciler patch the controls (the model of React):
use ferroui_base::layout::Orientation;
use ferroui_view::prelude::*;
#[component(rerender)]
fn Counter() -> Element {
let count = use_signal(|| 0);
rsx! {
StackPanel { orientation: Orientation::Horizontal, spacing: 8.0,
TextBlock { text: format!("Clicked {} times", count.get()) }
Button { class: "accent", on_click: move |_| count.update(|c| *c += 1), "Click" }
}
}
}
fn main() {
ferroui_view::launch(|| rsx! { Window { title: "Counter", Counter {} } });
}| The gallery of the API (light and dark, a TreeDataGrid and a colour view from their builders) | CRUD of 7GUIs as a component with hooks |
|---|---|
![]() |
![]() |
| Area | What it gives | API |
|---|---|---|
| Builders | A builder per control and setter per property and routed event, generated from the sources of the controls; the TreeDataGrid, the colour picker, the dialogs and the ReactiveUI controls behind features | button(), stack_panel().child(..), .set(property, value), .bind(property, binding) |
| Markup in Rust | Elements, attributes, attached properties, text, conditions and loops | rsx! { Grid { Grid.row: 1, Button { on_click: f, "Go" } } } |
| Fine-grained state | Signals, memos, effects and owners; a property follows a signal or a closure; two-way values | signal, memo, effect, text: count, text: name.two_way() |
| Children that follow state | Keyed lists, conditions, computed children | for_each, show, show_else, dynamic |
| Components | Run once, or run again; a component that runs again with comparable parameters is memoized by default (its parent's run skips it when they are equal) | #[component], #[component(rerender)], #[component(rerender, always)], rerender(..) |
| Hooks and context | State and effects of a component that runs again; values provided to the components below | use_signal, use_memo, use_effect, use_effect_with, use_hook, provide_context, use_context |
| Reconciler | Siblings matched by key and by place, equal values left alone, handlers swapped in place, values following the same signal kept, keyed lists reordered with the fewest moves | automatic |
| XAML together | A component in XAML, XAML (run time or compiled) in a component, the data context of a view model | ComponentHost, register_component, use_xaml, use_data_context |
| Virtualized lists | Data templates whose items are components, recycled as the list scrolls | template(|item: T| ..) |
| Styles and themes | Styles with XAML selectors, the theme variant and resources followed live | style("Button.accent").set(..), styles: [..], use_theme_variant, use_resource_as, ThemeVariantScope |
| Motion | Transitions and key-frame animations of the port | transition(property, ms(200)), transitions([..]), animation(..), use_animation |
| Popups | A popup's child and a context menu as elements | Popup { .. }, context_menu: rsx! { ContextMenu { .. } } |
| Tools | Hot reload of the literals of rsx!, diagnostics (keys, runaway components), an inspector of components on Shift+F12 |
feature hot-reload, set_diagnostics_handler, open_inspector |
| Asynchronous data | A future run by a component on the dispatcher of the thread, started again when its dependencies change; its state shown pending, ready or failed; a timer for debouncing | use_future(deps, |deps| future), suspense(..), AsyncState, sleep |
| Error boundaries | A panic of a component below shows a fallback instead of ending the application; the child can be mounted again | error_boundary(|| child, |info| fallback), info.reset() |
| Navigation | A router of views modelled on the routing of ReactiveUI: a stack of paths, routes with parameters | router("/", vec![route("/people/:id", |m| ..)]), use_router().navigate(..), navigate_back, navigate_and_reset |
| Samples | Hello, World! in each style; the 7GUIs in builders, rsx! and hooks versions; XAML interoperation; the gallery; TodoMVC; ReactiveDemo as components |
samples/HelloWorld.Builders, .Macros, .Hooks, .ComponentHost, samples/SevenGuis, samples/ViewInterop, samples/ViewGallery, samples/TodoMvc, samples/ReactiveDemoComponents |
For React developers, in short:
| React | FerroUI |
|---|---|
| JSX | rsx!, or the builders |
| function component | #[component(rerender)], or #[component] that runs once |
useState, useReducer |
use_signal (a Copy signal: get, set, update) |
useEffect, useLayoutEffect |
use_effect_with(deps, ..) with on_cleanup; use_effect follows the signals it reads |
useMemo, useCallback |
use_memo (follows signals, no dependency list); handlers need no memoizing |
useContext |
provide_context, use_context::<T>() |
React.memo, key |
the default for comparable parameters (always opts out), key: .. |
| portals | Popup with a child element |
| react-window | a virtualized ListBox with item_template: template(..) |
| Fast Refresh, React DevTools | feature hot-reload (literals), the inspector (Shift+F12) |
error boundaries, Suspense with data, React Router |
error_boundary, use_future with suspense, router with route |
| no counterpart | a property that follows a signal updates without running anything; typed setters checked at compile time; two-way values; XAML and components inside each other |
The design is in docs/declarative-ui.md, and the comparison with React in docs/declarative-ui-react.md.
Views can also be written in XAML, which the build compiles to Rust. FerroUI uses its own XML namespace:
<Window xmlns="https://github.com/ferroui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Hello">
<StackPanel Margin="16" Spacing="8">
<TextBlock Text="{Binding Greeting}" />
<Button Content="Click" Command="{Binding ClickCommand}" />
</StackPanel>
</Window>FerroUI has ports of System.Reactive, DynamicData, Splat and ReactiveUI, one crate each, and an integration of ReactiveUI with the controls (ferroui-reactiveui-controls) that is set up with use_reactive_ui on the application builder. Only the integration depends on the user interface, so view models can be tested without a window. The guide docs/mvvm.md covers view models, property paths, commands, views, routing, reactive collections, threading and testing, with the two samples, samples/ReactiveDemo and samples/ReactiveUIExample.
| ReactiveDemo | The DynamicData page of the ReactiveUI example |
|---|---|
![]() |
![]() |
AI agents can inspect and drive a running application through the optional MCP server: visual, logical and automation trees, properties, styles, resources, input, screenshots and condition waits. ControlCatalog supports --features mcp with stdio or authenticated loopback HTTP, including headless runs.
Press F12 in a window of an application that attaches the developer tools to inspect it: its logical and visual trees, and a combined tree (the default view) that shows the parts of each template greyed out below the element, the properties of the selected control with where each value comes from and an editor for it, the styles and setters that apply, its layout, and the routed events as they travel. The tools are ferroui-diagnostics, a port of upstream's last open-source developer tools, in the WinUI 3 theme with TreeDataGrids for the trees and the property grid: a header in the title bar with a command bar for the common commands, a button that collapses the tree pane, and the views in a tab view. The desktop ControlCatalog attaches them when it is built with its diagnostics feature: cargo run -p control-catalog-desktop --features diagnostics.
Attach them once the application is set up (the ControlCatalog does it in samples/ControlCatalog.Desktop/program.rs), or use the feature diagnostics of the facade:
use ferroui_diagnostics::DevToolsExtensions;
let builder = builder.after_setup(|builder| {
#[cfg(debug_assertions)]
if let Some(application) = builder.instance() {
application.attach_dev_tools();
}
});Remote inspection and automation are available through the opt-in Chrome DevTools Protocol endpoint:
FERROUI_CDP_PORT=9222 cargo run -p control-catalog-desktop --features cdpConnect Chrome DevTools through chrome://inspect, or use a Playwright CDP session. The facade
feature is devtools; ferroui-inspect provides the shared inspection core. Browser builds can
opt into a JavaScript transport bridge. See the guide for supported commands and limitations.
The crate of each directory is in the table of crates above.
| Path | Contents |
|---|---|
components/FerroBoard |
Detachable native on-screen keyboard, standalone sample and tests; try Text → FerroBoard in ControlCatalog |
src |
The crates of the framework, one directory per crate (src/FerroUI.Base, src/FerroUI.Controls, src/Markup/..., src/Skia/..., src/Windows/..., ...) |
native/FerroUI.Native |
The Objective-C++ library of the macOS platform |
external/XamlX |
The XAML compiler front end (xamlx) |
samples |
The sample applications: the ControlCatalog with its hosts for the desktop, the browser, iOS and Android, the WinUI gallery, the gallery of the WinUI theme with its comparison against WinUI 3, and the smaller samples |
tests |
Test crates: the XAML suites, the render tests, the leak tests, the benchmarks, the Windows integration tests and the comparison of the render backends |
docs |
The guides (declarative UI, themes, bindings, MVVM, size, performance); under docs/porting the design and verification documents of each platform and subsystem, and the tracking against the projects FerroUI grew from |
scripts |
Code generators, the status tooling, the release scripts and the build and run scripts of each platform |
Using the framework:
- Declarative Rust UI:
ferroui-view, its builders,rsx!, signals, components, hooks, the reconciler, XAML interoperation, tools and the phases of the work; compared with React. - XAML design: the markup pipeline, the run-time loader and the compiler of markup to Rust.
- x:Bind: compiled
{x:Bind}, one core for FerroUI XAML and WinUI XAML in the run-time loader and the Rust emitter, its lifecycle, hot reload and the migration from{Binding}and the former WinUI adapter. - Compiled XAML themes: how themes are compiled and trimmed, and the rules for writing or porting theme markup without reflection, extra size or start-up cost (compiled bindings, units, tables).
- MVVM on FerroUI: ReactiveUI, DynamicData and System.Reactive on FerroUI, with the samples ReactiveDemo and ReactiveUIExample.
- Developer tools: the developer tools attached with F12, member by member.
- Binary size: what an executable is made of, the
distprofile to ship with, and the settings that make it smaller. - Build performance: measured Cargo-compatible build options, compiler caching, browser work reuse, and reproducible CI comparisons.
- Compiler cache (sccache): installing and enabling sccache, cache location and size, what it caches, and its interplay with incremental compilation.
- Platforms: Windows, WinUI, Linux on X11 with AT-SPI, Wayland, Linux framebuffer, OpenGL on macOS and iOS, iOS, Android, browser with its render worker, headless VNC, Vulkan.
- Rendering: render thread, Vello backend, render tests, WPF-style 3D (Viewport3D and Media3D).
- Releasing: the published crates, the version scheme and the release workflow; changelog.
Design, state and compatibility:
- Critical path: the state of each subsystem and what is open.
- Porting guide: the class model, naming and mapping rules, and the conventions every ported file follows.
- Tracking and what is left: generated per-file, per-type and per-member status.
- Deviations: every place where FerroUI differs from the projects it follows, and why.
- Idiomatic Rust under the .NET-named API: the names that stay .NET-like, the std and chosen-crate types that replace the ports of
System.*types, the deprecation policy for 0.5 and the inventory of the work (#423). - WinUI controls: the plan, inventory and rules of the native ports of WinUI 3 controls (icons, InfoBar, NumberBox, NavigationView and others), the WinUI-only templates, the symbol font and the two navigation models.
- Windows Calculator framework gaps: the inventory, design and plan of VisualStateManager with state triggers and storyboards, ListView and GridView, SwipeControl, Pivot and system high contrast, the framework features the Calculator port found missing.
- LiveCharts2 port: the landing plan, the accounting of every upstream source, API member and test, and the compiled sample.
- WinUI Charts port: the published-contract boundary, native implementation, complete source/test mapping, adaptations and compiled sample.
Please open an issue to discuss a change before sending a pull request. Contributions follow the conventions of the code base (the class model, naming and mapping rules of the guide), come with tests, record a change of behaviour that the framework shares with a reference implementation in DEVIATIONS.md, and keep cargo test --workspace green. A large change can be sent as a stack of pull requests.
FerroUI started as a port of the Avalonia UI framework to Rust, and its object model, styling, layout, input and composition architecture follow that design; the XAML compiler front end comes from XamlX. Applications, themes and markup written against that model carry over with their structure. Other parts are native ports of their own sources: the WinUI 3 controls, theme and composition API, Xaml.Behaviors, the TreeDataGrid, LiveCharts2, Rx.NET, DynamicData, ReactiveUI and Splat. The declarative Rust layer, compiled {x:Bind}, theme trimming, the Material 3 and macOS 26 themes, the portable media stack, 3D and the performance work are FerroUI's own.
What follows a source is tracked against it: the state per member in docs/porting/TRACKING.md, the test suites per project in docs/porting/TESTS.md, what is not carried over in docs/porting/REMAINING.md, and every difference in docs/porting/DEVIATIONS.md. Of the source projects in scope, every member has a counterpart or is waived with a reason (30354 present, 5856 waived, none missing), except 67 members, three types and one file that the idiomatic Rust cleanup (#423) renamed or made concrete and that the tracking data does not map yet.
FerroUI is licensed under the MIT License.
It is derived from other open source projects, and some files are carried under their original licenses. See NOTICE.md and the component-level notices it refers to for the full attributions and license texts.
The development reload engine and sample are described in Hot reload development engine, including the supported edits and release gates. Runtime XAML reload preserves supported live components through transactional adapters. Explicit Rust functions can be patched with the pinned Subsecond toolchain; the sample supervisor coordinates combined updates and stateful restart.







