Jonathan Kelley d56fabfe9a Merge branch 'master' into feat/window_close_behaviour 2 лет назад
..
assets c113d96bbe fix: Update logos and custom assets example (#960) 2 лет назад
cfg.rs 6a705b6a0e add functionality 2 лет назад
desktop_context.rs 3658698064 put webview in rc 2 лет назад
element.rs 6512c153dd Fix merge errors 2 лет назад
escape.rs d9546d9504 Renderers are now packages, not features. (#387) 3 лет назад
eval.rs fa9f0d0f6c Generalize Query system for use in use_eval and node querys 2 лет назад
events.rs 22e71a71bd feat: return window 2 лет назад
file_upload.rs 2ce8ded74d FIx desktop for android 2 лет назад
index.html 049976d23a feat: allow customizing the index and head 3 лет назад
lib.rs d56fabfe9a Merge branch 'master' into feat/window_close_behaviour 2 лет назад
mobile_shortcut.rs 4f22fe3ca8 Stub out files and RFD on ios 2 лет назад
protocol.rs d09c92beda Add initial_value attribute & fix static special attribute handling (#1063) 2 лет назад
query.rs 6e5fbcff63 Increase the number of tokio channels for the query engine from 8 to 1000. (#1095) 2 лет назад
readme.md ef9731eb74 update docs about dioxus desktop 2 лет назад
shortcut.rs 2ce8ded74d FIx desktop for android 2 лет назад
waker.rs 880aa737a6 feat: multiwindow support 2 лет назад
webview.rs 014bdef744 Merge pull request #945 from ProfXwing/return-context 2 лет назад

readme.md

Dioxus Desktop Renderer

Render the Dioxus VirtualDom using the platform's native WebView implementation.

Desktop

One of Dioxus' flagship features is the ability to quickly build a native desktop app that looks and feels the same across platforms. Apps built with Dioxus are typically <5mb in size and use existing system resources, so they won't hog extreme amounts of RAM or memory.

Dioxus Desktop is built off Tauri. Right now there aren't any Dioxus abstractions over the menubar, handling, etc, so you'll want to leverage Tauri - mostly Wry and Tao directly. An upcoming release of Dioxus-Desktop will include components and hooks for notifications, global shortcuts, menubar, etc.

Getting Set up

Getting Set up with Dioxus-Desktop is quite easy. Make sure you have Rust and Cargo installed, and then create a new project:

$ cargo new --bin demo
$ cd app

Add Dioxus and the desktop renderer feature:

$ cargo add dioxus
$ cargo add dioxus-desktop

Edit your main.rs:

// main.rs
use dioxus::prelude::*;

fn main() {
    dioxus_desktop::launch(app);
}

fn app(cx: Scope) -> Element {
    cx.render(rsx!{
        div {
            "hello world!"
        }
    })
}

To configure the webview, menubar, and other important desktop-specific features, checkout out some of the launch configuration in the API reference.

Future Steps

Make sure to read the Dioxus Guide if you already haven't!