返回资讯中心
外部精选
软件工程
#开发者实时流

Freya: Build cross-platform, performant, accessible and unique apps with Rust

Build cross-platform, performant, accessible and unique apps with 🦀 Rust.

Hacker News 最新andunie2026/11/11 · 今天10 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

BlogDocsSource codeSupportDiscord

Build your next app with Rust

Build cross-platform, performant, accessible and unique apps with 🦀 Rust.

fn app() -> impl IntoElement { let mut count = use_state(|| 4);

let counter = rect() .width(Size::fill()) .height(Size::percent(50.)) .center() .color((255, 255, 255)) .background((15, 163, 242)) .font_weight(FontWeight::BOLD) .font_size(75.) .child(count.read().to_string());

let actions = rect() .horizontal() .center() .spacing(8.0) .child( Button::new() .on_press(move || *count.write() += 1) .child("Increase"), ) .child( Button::new() .on_press(move || *count.write() -= 1) .child("Decrease"), );

rect().child(counter).child(actions) }

Try it in your browser ↗Run locally ↗More examples ↗

Features

Docs ↗

Cross-platform↗

Linux

Windows

macOS

Android

Web

Rendering↗

Skia rendering with Vulkan, OpenGL, Metal, and software backends. GPU support and fallback depend on the platform.

Async runtime↗

Spawn tasks tied to a component, a window, or the whole app. Integrate Tokio when you need it.

State & caching↗

Reactive state, shared stores, and async queries with caching and invalidation through Freya Query and Radio.

Routing↗

Typed routes, nested views, and navigation history, without putting everything in one component.

Multi-window & tray↗

Open more windows, share state between them, and keep desktop actions in the system tray.

Terminal↗

Embed a terminal with PTY support, keyboard and mouse input, and clipboard integration.

HTML & Markdown↗

Render HTML and CSS with Blitz, or display Markdown documents inside your app.

Camera & video↗

Capture webcam frames or play video with audio using optional media integrations.

Components & animation↗

Buttons, inputs, calendars, virtual lists, and more. Animate sizes, positions, and colors.

Text & code editing↗

Text selection, cursor control, rich editing, and a code editor with tree-sitter highlighting.

Testing & devtools↗

Test interactions headlessly. Inspect the component tree, layout, and performance as you build.

Docs & examples↗

API references, guides, and runnable examples, from a counter to multi-window apps.

AI-ready↗

Give your coding assistant the Freya skill or llms.txt so it can work with the right APIs.

Charts & plotting↗

Build charts, graphs, and interactive data visualizations with the Plotters integration.

Icons↗

Use Lucide icons in your components, with control over their size and color.

Internationalization↗

Translate your app with Fluent and switch languages while it is running.

Accessibility↗

AccessKit integration, accessible roles and labels, keyboard navigation, and focus management.

Theming↗

Share colors and typography across components, create custom themes, and switch them at runtime.

Shaders & custom drawing↗

Write Skia shaders, draw on the canvas, and add gradients, shadows, and blur to your UI.

Docking & resizable panels↗

Build tabbed workspaces with dockable panels, split layouts, and draggable resize handles.

Drag & drop↗

Move typed data between drag sources and drop targets, or handle files dropped into your app.

Material Design↗

Add Material Design components and effects, including ripples, to your app.

Buttons, sliders, calendars, color pickers, and virtual lists. Try them in the gallery.

Animate colors, sizes, and positions with control over timing, easing, and sequences.

Selection, keyboard shortcuts, formatting, and virtualization for more than a basic input field.

Rope-based text editing and tree-sitter syntax highlighting in a reusable component.

Draw charts and interactive visualizations with the Plotters integration.

A terminal inside your app, with PTY support for shells and command-line tools.

Inspect the component tree and its properties while your app is running.

Build cross-platform, native GUI applications with Rust and Skia.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →