Dioxus 是一款用于构建跨平台用户界面的框架,API和设计都是React风格的。
Freya是基于Dioxus,主要是在渲染层使用Skia而不是依赖Web技术。
主要的区别是:Freya可以独立运行在端上,不需要依赖系统Webview之类。因此这种方式兼容性强,跨端一致性好。
Dioxus
https://dioxuslabs.com/
https://www.dioxus.cn/
功能亮点
参照 React 设计,使得相关开发人员过渡简单。
强大状态管理系统以及易用的 Hooks 设计。
桌面应用原生支持,提供部分常用 API 可调用。
简洁的 RSX 界面声明格式,比 HTML 更加易读。
多平台支持
Dioxus 支持多平台开发,这意味着你的大部分代码可以在任意平台下被构建使用。
目前为止,支持的平台有:
网页应用(使用 WASM 构建)
桌面应用(使用 Wry 构建)
移动应用(使用 Wry 构建)
终端应用(使用 Rink 构建)
Freya
不过多翻译了,直接搬运官网指南:
https://book.freyaui.dev/
Freya is native GUI library for Rust🦀, built on top of 🧬 Dioxus’s core and powered by 🎨 Skia as a graphics library.
Features
⛏️ Built-in components (button, scroll views, switch and more)
🚇 Built-in hooks library (animations, text editing and more)
🔍 Built-in devtools panel (experimental ⚠️)
🧰 Built-in headless testing runner for components
🎨 Theming support (not extensible yet ⚠️)
🛩️ Cross-platform (Windows, Linux, MacOS)
🖼️ SKSL Shaders support
🔄️ Dioxus Hot-reload support
📒 Multi-line text editing (experimental ⚠️)
🦾 Basic Accessibility Support (experimental ⚠️)
🧩Compatible with dioxus-std and other Dioxus renderer-agnostic libraries
Why 🧬 Dioxus?
Dioxus is a React-like library for Rust. Its component and hooks model make it simple to use and scale to complex apps. Freya uses some of Dioxus core crates to build it’s own renderer, this is because Dioxus is to it’s core a renderer-agnostic UI library. See other differences with Freya.
Why 🎨 Skia?
Skia is a battle-tested and well-maintained graphics library, and there are even some rusty bindings.