Skip to content
프로젝트

소개

Build WPF/SwiftUI-grade web apps in Rust running on the browser, MacOS, Windows and Linux without Electron or WebView. No DOM. No CSS. No virtual DOM diffing.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

FUI-RS — cross-platform retained Rust UI for web and native desktop

FUI-RS CI crates.io docs.rs npm License: AGPL-3.0 or commercial

FUI-RS is a web-born, cross-platform retained-mode UI framework for Rust. One application model runs in browsers through WebAssembly and as a real native application on macOS, Windows, and Linux, without Electron or a WebView. Android and iOS are not supported yet.

The browser is a primary target, not a compatibility layer. FUI-RS supports the web platform facilities application UI depends on, including accessibility, IME and text editing, password-manager integration, workers, history, files, touch input, and asynchronous assets. Its native hosts reuse that architecture rather than defining a separate framework.

The SDK includes retained nodes, controls, layout, themes, events, popups, dialogs, editable text, selection, custom drawing, workers, host services, accessibility semantics, and Rust-specific authoring macros.

https://github.com/user-attachments/assets/75815f18-8476-4882-b290-6a6bd6a9b0e7

More demo videos, including the Galaga-style space shooter

https://github.com/user-attachments/assets/198f1c7f-3d92-4acb-b2b3-53fd72898ed0

https://github.com/user-attachments/assets/22e2c40f-a762-4a05-b164-4499cca0bf27

https://github.com/user-attachments/assets/f4b94bad-b93d-486e-8ed4-43482990d324

https://github.com/user-attachments/assets/ac497b4a-cc36-4f4f-862d-005ca706edbc

Start a project

For a new native, web, or universal application, use cargo-fui:

Install the platform compiler and linker first: Xcode Command Line Tools on macOS; Visual Studio 2022 Build Tools with Desktop development with C++ and a Windows SDK on Windows; or a C/C++ toolchain and the required native development libraries on Linux. Windows ARM64 also requires the ARM64 C++ build tools.

Then install stable Rust and Cargo through rustup:

rustc --version
cargo --version
cargo install --locked cargo-fui
cargo fui new my-app --target universal
cd my-app
cargo fui dev

Choose native for desktop only, web for browser only, or universal for a shared retained UI with explicit native and web adapters.

For a browser-only application that needs the npm-oriented simple or routed/MVC scaffolds, use create-fui-rs-app:

npx @effindomv2/create-fui-rs-app my-app
cd my-app
npm install
npm run dev

See the FUI-RS quickstart for prerequisites and the exact differences between these entry points.

How the stack fits together

                  Your retained Rust UI
                           │
                           ▼
                         FUI-RS
          controls, themes, events, application APIs
                           │
                           ▼
                        EffinDOM
           layout, text, rendering, input, semantics
                     ╱             ╲
                    ▼               ▼
            Browser host      Native desktop host
            WebAssembly       macOS / Windows / Linux

cargo-fui sits around this stack as project/build/package tooling. FUI-RS package metadata identifies the compatible EffinDOM runtime, so application developers do not manually synchronize runtime versions.

Minimal retained UI

use fui::prelude::*;

fn build_page() -> FlexBox {
    ui! {
        column().fill_size().padding(24.0, 24.0, 24.0, 24.0) {
            text("Hello from FUI-RS").font_size(28.0),
            button("Click me").on_click(|_| {
                logger::info("App", "Button clicked");
            }),
        }
    }
}

fui_app!(FlexBox, build_page);

FUI-RS is retained mode:

  • Construct controls once.
  • Keep stateful controls when callbacks need to mutate them.
  • Mutate retained objects from events, timers, host callbacks, or signals.
  • Use ui! as construction syntax, not as a recurring render function.

FUI-RS maps retained inheritance to capability traits. Node supplies common retained state and raw events, while visual controls expose layout, style, flex-layout, child-container, text, focus, and interaction capabilities as appropriate.

Current status

FUI-RS is feature-rich early access. It already supports substantial retained UI and native packaging, but breaking API and generated-project changes remain possible before 1.0 when correctness or Rust ergonomics require them.

Current boundaries:

  • Native support is desktop macOS, Windows, and Linux. iOS and Android are not currently supported.
  • Accessibility projection is implemented through DOM/ARIA on the web, NSAccessibility on macOS, Microsoft UI Automation on Windows, and AT-SPI on Linux. Broad compatibility testing across screen readers, browser combinations, and Linux desktop environments remains early.
  • Find-on-page is implemented through retained find for the normal desktop shortcut and projected semantic text for mobile or explicitly invoked browser-native find. Browser-native highlights can render with a slightly different DOM font from the canvas text.
  • Native and web targets intentionally expose different platform-service adapters where the underlying capability differs.
  • Browser-only routed applications use separate WASM modules and a shared browser shell; native applications do not use that routing model.
  • Native packaging does not supply an application's production signing identity, store account, notarization credentials, or distribution policy.
  • The third-party control and integration ecosystem is new.

Open a discussion when evaluating FUI-RS for an application whose requirements touch one of these boundaries.

Community projects

Documentation

The live routed demo demonstrates the browser/npm workflow. Native and packaging claims are validated separately by cargo-fui fixtures and native platform tests.

Contributing

Application developers should begin with the quickstart. Contributors working on the SDK should follow the FUI-RS contributor quickstart.

License

FUI-RS is AGPL-3.0-only or commercially licensed. See the commercial licensing terms. EffinDOM runtime components are distributed under their own terms; FUI-RS's AGPL licence should not be inferred to apply to the runtime itself.

관련 프로젝트 살펴보기

불러오는 중…