Wings Framework v0.2

Version 0.2.0 · · crates.io

Wings 0.2 gives Bevy apps the platform's own design: Cupertino with Liquid Glass on iPhone and Mac, Material on Android and Fluent on Windows.

  • Material, Cupertino and Fluent
  • Liquid Glass
  • Safe areas
  • Touch and gamepad
  • 312 tests

The platform's own design, from one widget API

Wings 0.2 makes Bevy applications look and feel native on every platform. One widget API now draws four designs: Material on Android and Linux, Cupertino on iPhone, iPad and Mac, and Fluent on Windows. The same scene, the same view models and the same navigation produce each of them.

Liquid Glass on Apple platforms, safe areas for every kind of screen, touch and gamepad input, and a much larger set of widgets, navigation features and data sources complete the release. The workspace still has 13 library crates, all published on crates.io at version 0.2.0.

Wings gallery Home screen on iPhone with the Cupertino design in light mode: a banner with the Wings logo, theme aware buttons and shader effects.
iPhone · Cupertino. iPhone 17 Pro, iOS 26 simulator
Wings gallery Home screen on Mac with the Cupertino design in light mode: a banner with the Wings logo, theme aware buttons and shader effects.
Mac · Cupertino. Native window on macOS
Wings gallery Home screen on Android with the Material design in light mode: a banner with the Wings logo, theme aware buttons and shader effects.
Android · Material. Pixel 9 emulator, Android 16
Wings gallery Home screen on Windows with the Fluent design in light mode: a banner with the Wings logo, theme aware buttons and shader effects.
Windows · Fluent. Windows profile, rendered on a Mac

Every capture on this page is the Wings gallery from the framework repository, running the same Rust code. iPhone captures come from the iOS 26 simulator on an iPhone 17 Pro, Android captures from a Pixel 9 emulator on Android 16, and Mac captures from a native macOS window. The Fluent captures were rendered on a Mac with the gallery's Windows desktop profile, so their text uses San Francisco where Windows shows Segoe UI Variable.

Install and upgrade

Version 0.2.0 targets Bevy 0.20, Rust 1.97.1 or newer and the Rust 2024 edition. Every library crate shares the version, so updating the facade is enough when you depend on it.

  • Default features: shaders (custom UI materials, Liquid Glass and the backdrop blur) and native (safe areas read from iOS, Android and macOS).
  • Optional features: database for the redb backed DatabaseSource, and http for HttpRemote with the bundled ureq client.
  • The default look now follows the platform. Read Upgrading from 0.1 below to keep Material everywhere.
  • On Ubuntu and Debian, interactive apps need libudev-dev, libx11-dev, libxi-dev, libxrandr-dev, libxcursor-dev and libxkbcommon-dev. The libraries themselves build on Linux without choosing X11 or Wayland.
[dependencies]
bevy = "0.20"
bevy_wings = "0.2"

Four designs: Material, iOS, macOS and Fluent

WingsDesign selects Material, iOS, macOS or Fluent. Cupertino resolves to the iOS or macOS design for the current platform. Widgets keep one API and get their look from per design skins that run in the new WingsUiSystems::Skin set, so the design can change while the app runs and every widget restyles at once.

The Apple designs use the iOS and macOS system colors, labels, fills and grouped backgrounds, the type ramps, radii, spacing and spring motion of each platform, measured against a SwiftUI reference app on iOS 27 and macOS 27. Translucent colors blend in sRGB like the platforms do. Text uses the system UI font (San Francisco, never bundled) and falls back to Inter. Fluent brings the Fluent 2 colors, type ramp, radii and controls.

A wings.toml file next to Cargo.toml chooses the look. With ui = "system" an app gets Material on Android and Linux, Fluent on Windows and Cupertino on iOS and macOS. With ui = "custom" one design applies everywhere, with your own accent, fonts, radii, spacing and color roles. The wings_config! macro embeds the file at compile time.

Wings gallery Settings screen on iPhone with the Cupertino design in light mode: grouped list sections with icons, details and accessories.
iPhone · Cupertino. Inset grouped lists, a large title and a Liquid Glass tab bar.
Wings gallery Settings screen on Android with the Material design in light mode: grouped list sections with icons, details and accessories.
Android · Material. Material 3 lists, a top app bar and a navigation bar.
Wings gallery Settings screen on Mac with the Cupertino design in light mode: grouped list sections with icons, details and accessories.
Mac · Cupertino. A floating sidebar, a unified title bar and grouped sections.
Wings gallery Settings screen on Windows with the Fluent design in light mode: grouped list sections with icons, details and accessories.
Windows · Fluent. A navigation pane with an accent indicator and card rows.

Follow the platform with wings.toml

This is the gallery's own configuration. Set accent to tint Apple and Windows controls and seed the Material palette.

# "system": the platform's own design. Material on Android and Linux,
# Fluent on Windows, Cupertino on iOS, iPadOS and macOS.
# "custom": the design in [custom], identical on every platform.
ui = "system"

# "light", "dark" or "system".
appearance = "light"

[custom]
design = "material"

cargo run -p wings-gallery · Complete example source

Load the configuration and switch designs at runtime

WingsUiPlugins::configured reads the embedded file. Any system or observer can change the design later; the gallery's Settings screen does it from a list row.

App::new()
    .add_plugins(DefaultPlugins)
    .add_plugins(WingsUiPlugins::configured(wings_config!()))
    .run();

// Inside a bsn! Children list:
@WingsListItem { @headline: "Fluent", @supporting: "Windows" }
on(|_: On<Activate>, mut theme: ResMut<WingsTheme>| {
    theme.set_design(WingsDesign::Fluent)
})

cargo run -p wings-gallery · Complete example source

Liquid Glass on iPhone and Mac

Floating chrome on Apple platforms now sits on real glass. Top bars, tab bars, sidebars, sheets, menus and toasts render on an overlay camera that follows the app camera's render target, so glass also works over images and in second windows. The content behind is captured, blurred with a dual Kawase filter and refracted by WingsLiquidGlassMaterial, which adds a rim light, a tint and adaptive brightness.

The iOS 26 navigation bar is reproduced in detail: glass capsule buttons, the soft scroll edge over the status bar and the toolbar row, an inline title centered like UIKit (shortened when space runs out), and large and inline titles that hand over as you scroll. It was compared side by side with a SwiftUI app on the iOS 26 simulator.

  • WingsGlass turns any node into glass, and WingsScrollEdge adds the soft edge where content scrolls under a bar.
  • When shaders are off, headless or disabled through WingsGlassSettings, glass falls back to a translucent fill with a hairline border and a soft shadow.
  • On iOS the drawable covers the whole screen and Wings draws its own Liquid Glass; there is no native UIKit chrome.
Wings gallery Home screen on iPhone with the Cupertino design in light mode: a banner with the Wings logo, theme aware buttons and shader effects.
iPhone · Cupertino. The tab bar and the toolbar buttons float on glass and refract the content below.
Wings gallery Home screen on Mac with the Cupertino design in light mode: a banner with the Wings logo, theme aware buttons and shader effects.
Mac · Cupertino. On the Mac the sidebar floats over the window with the same material.

Safe areas for every screen

WingsSafeArea describes everything that can cover an app: notches, the Dynamic Island, the home indicator, status, navigation and gesture bars, display cutouts, foldable hinges, the on screen keyboard and the macOS title bar. Scaffolds apply the insets by themselves, and WingsSafeAreaPadding adds them to any node.

With the native feature the insets come from the platform: winit's safe area on iOS, the content rectangle on Android and the transparent title bar on macOS. On a desktop, device profiles preview an iPhone, iPad, Android phone or tablet, foldable, TV, Mac, desktop or Vision window, in portrait or landscape, with a simulated status bar and home indicator.

Right to left layouts arrive in the same release: WingsLayoutDirection mirrors rows, paddings and transitions, and WingsNoMirror keeps a subtree as it is.

// Preview an iPhone on the desktop: its size, safe area,
// Dynamic Island and home indicator.
app.insert_resource(WingsDevicePreview::new(WingsDeviceProfile::IPHONE_PRO));

// The gallery reads the same from the environment:
// WINGS_DEVICE=iphone cargo run -p wings-gallery

Touch, keyboard and gamepad

Every scroll area scrolls by touch, with momentum after a flick that follows the iOS deceleration curve, catching when a finger lands on moving content, and tap cancellation once a drag starts scrolling. Taps that begin and end in the same frame, like quick taps and simulator clicks, now activate widgets instead of leaving them pressed.

Keyboard focus shows a focus ring in the style of each design. The D-pad, the left stick and the arrow keys move focus between all interactive widgets; South activates and East goes back.

One back pipeline serves every platform. Escape, gamepad East, Android's back button and gesture and the iOS edge swipe close the topmost menu, then dialog, then sheet, before going back a screen. At the first screen Android apps stay open.

  • WingsTouchScroll, WingsGamepadNavigation and WingsEdgeSwipeBack are on by default and can be turned off.
  • The iOS edge swipe is interactive with parallax and completes past a third of the width or on a flick.
  • Custom overlays join the pipeline through WingsBack in WingsBackSystems::Overlays.

New widgets and controls

The widget set grows with segmented buttons and tabs, dropdowns and menu buttons, tooltips, date and time pickers, and bottom and side sheets with scrims, detents and dismissal. Lists gain detail text and accessories, dialogs gain a destructive style, and screens can use large titles.

WingsVirtualList and WingsVirtualGrid create only the rows that are visible. A test scrolls through 10,000 items and a benchmark covers 100,000 rows, so long lists stay cheap.

Wings gallery Controls screen on iPhone with the Cupertino design in light mode: checkboxes, switches, sliders, radio buttons, chips, segments, tabs and pickers.
iPhone · Cupertino. Switches, segmented controls and a check mark radio list.
Wings gallery Controls screen on Android with the Material design in light mode: checkboxes, switches, sliders, radio buttons, chips, segments, tabs and pickers.
Android · Material. Material checkboxes, chips, an outlined text field and tabs.
Wings gallery Controls screen on Mac with the Cupertino design in light mode: checkboxes, switches, sliders, radio buttons, chips, segments, tabs and pickers.
Mac · Cupertino. Push buttons, pop up buttons, a date picker and a time stepper.
Wings gallery Controls screen on Windows with the Fluent design in light mode: checkboxes, switches, sliders, radio buttons, chips, segments, tabs and pickers.
Windows · Fluent. Accent chips, pivots, a combo box and a calendar.

Segments, tabs and menus

From the gallery's Controls screen. Each control reports its own event, and the same scene renders in every design.

@WingsSegmented { @options: vec!["Day".into(), "Week".into(), "Month".into()] }
on(|ev: On<WingsSegmentChanged>| info!("segment {}", ev.index))
--
@WingsTabs { @options: vec!["Overview".into(), "Details".into(), "Activity".into()] }
--
@WingsDropdown { @options: vec!["Small".into(), "Medium".into(), "Large".into()], @selected: 1 }
on(|ev: On<WingsMenuSelected>| info!("size {}", ev.label))
--
@WingsButton { @text: "Hover me", @variant: WingsButtonVariant::Text }
WingsTooltip { text: "Tooltips follow the design", delay: 0.5 }

WINGS_SCREEN=controls cargo run -p wings-gallery · Complete example source

A list of 10,000 rows

The builder runs only for rows on screen. Attach the list to a node with a height, inside a card or a scroll area.

fn virtual_rows() -> WingsVirtualList {
    WingsVirtualList::new(10_000, 56.0, |index| {
        let headline = format!("Row {}", index + 1);
        let supporting = if index % 2 == 0 { "Even" } else { "Odd" };
        Box::new(bsn! { @WingsListItem { @headline: headline, @supporting: supporting } })
    })
}

WINGS_SCREEN=controls cargo run -p wings-gallery · Complete example source

Data and domain: files, databases and HTTP

The data layer gains real backends. FileSource stores entities in a file with atomic writes and any Codec. DatabaseSource keeps them in an embedded redb database (feature database). HttpRemote talks to a server over any WingsHttpClient; UreqClient is included with the http feature, and HTTP status codes map to domain errors. Remote calls run on Bevy's async tasks through load.

Entities serialize through Codec and JsonCodec, and Id<T> and the paging types support serde. In the domain layer, UseCaseExt wraps any use case in retries with backoff, timeouts, logging and mapping. Each decorator is a use case itself, so they nest in any order and plug into dependency injection like the use case they wrap.

  • MVVM gains Loadable bindings: bind_loading, bind_refreshing, bind_loaded, bind_failed and bind_error_text show each state of a background load without extra systems.

Retry, time out and log a use case

From the domain crate documentation. LoadNotes is the gallery's use case; the pipeline keeps its input and output types.

let load = LoadNotes { repository }
    .retry(RetryPolicy::times(3).with_backoff(Duration::from_millis(200)))
    .timeout(Duration::from_secs(5))
    .logged("load notes", |event| println!("{event:?}"));

WINGS_SCREEN=notes cargo run -p wings-gallery · Complete example source

Theme files with hot reload

Themes can live in .wings.toml asset files. WingsThemeFilePlugin loads one and, with Bevy's file_watcher feature, applies every saved change while the app runs. The gallery enables it: run it with WINGS_THEME_FILE=themes/brand.wings.toml, edit the file and save.

ui = "custom"
appearance = "system"
accent = "#6750A4"

[custom]
design = "material"
radii = [0, 6, 10, 14, 20, 28]
spacing = [4, 8, 16, 24, 32]

[custom.light]
primary = "#6750A4"

[custom.dark]
primary = "#D0BCFF"

Shaders: glass, scroll edges, borders and noise

The shader crate adds WingsLiquidGlassMaterial, WingsScrollEdgeMaterial, WingsGradientBorderMaterial and WingsNoiseMaterial, plus the backdrop blur that feeds the glass. The gallery's Home screen shows the noise background and the gradient border next to the theme aware buttons.

Every shader is validated with naga, and the uniform layouts are checked against the Rust structs, so a mismatch fails a test instead of a GPU pipeline.

Tests, benchmarks and screenshots

The release passes 312 tests. Stress benchmarks spawn very large widget counts, and a screenshot harness renders 48 gallery cases (four designs, three screens, light and dark, phone and desktop sizes) with a fixed frame time and compares them with per platform baselines in a macOS GPU workflow.

Rust 1.97.1, the minimum supported version, builds every target with all features. Every library crate packages and builds from its packaged sources with cargo publish --dry-run.

cargo test --workspace --all-features --locked
cargo bench -p bevy_wings_ui_widgets --bench stress
python3 scripts/visual-regression.py

Upgrading from 0.1

Most apps only need the new version number. These changes can affect existing code:

  • The default look follows the platform: Cupertino on iOS and macOS, Fluent on Windows. To keep Material everywhere, add a wings.toml with ui = "custom" and design = "material" and use WingsUiPlugins::configured(wings_config!()), or start from WingsThemePlugin::with_theme(WingsTheme::for_design(WingsDesign::Material)).
  • WingsUiSystems::Skin runs between Responsive and Modifier, so WingsUiSystems::ORDER has 10 entries. Exhaustive matches on WingsUiSystems need the new arm.
  • ColorRole gained Fill, SecondaryFill, TertiaryFill, TertiaryLabel, GroupedBackground and SecondaryGroupedBackground; ColorRole::BUILT_IN has 44 entries.
  • Structs built field by field need the new fields or ..default(): WingsBackInput, WingsTheme, WingsDialogProps and WingsDialogButton, WingsTopAppBarProps and WingsListItemProps. Props set through bsn! are unaffected.
  • Escape and the browser back key close the topmost menu, dialog or sheet first; only a press that no overlay used pops the navigation stack.
  • The facade enables the native feature by default. Touch scrolling, gamepad navigation and the iOS edge swipe are on by default.
  • Several public systems gained parameters. This only matters when calling them directly instead of through the plugins.
# Keep the Material look of 0.1 on every platform.
ui = "custom"

[custom]
design = "material"

Known limitations

These are the open points of 0.2.0, as listed in the changelog:

  • .bsn scene asset files wait for Bevy's .bsn loader; scenes stay in bsn! until it ships.
  • Apps linked against the iOS 27 SDK must adopt the UIScene life cycle, which winit 0.30 (used by Bevy 0.20) does not support yet. Build iOS apps with the iOS 26 SDK for now.
  • On Android 13 and newer, set android:enableOnBackInvokedCallback="false" in the app manifest so the back gesture reaches the app.
  • Screenshot baselines depend on fonts and GPU drivers and are kept per platform.

What comes next

These are directions for version 0.3, not features of 0.2 or promises with dates:

  • .bsn asset files for widget scenes once Bevy ships the loader.
  • Native text input with IME composition on every platform.
  • An accessibility tree for screen readers, with AccessKit roles and labels on every widget.
  • Pull to refresh, swipe actions on list rows, context menus and long press menus.
  • Charts (line, bar and pie) themed per design, and localization helpers.
  • Material You dynamic colors from the wallpaper on Android.

License and contributing

Wings is MIT licensed. The embedded Inter font is distributed under the SIL Open Font License. Use the GitHub repository to follow development, report reproducible issues and propose changes; for a UI issue, include the design, the platform, the Bevy and Rust versions, the enabled features and the smallest example that shows it.

Wings Framework v0.1

DoubleG Arts