dioxus/packages/desktop/src
2024-01-30 16:20:19 -08:00
..
assets fix: Update logos and custom assets example (#960) 2023-04-15 08:02:04 -05:00
app.rs Tiny aesthetic tweaks 2024-01-18 10:59:43 -08:00
assets.rs Cleanup runtime code 2024-01-16 17:38:39 -08:00
config.rs remove some generics from LaunchBuilder 2024-01-17 20:15:16 -06:00
desktop_context.rs Fix non tokio builds for desktop 2024-01-18 04:07:28 -08:00
edits.rs Tiny aesthetic tweaks 2024-01-18 10:59:43 -08:00
element.rs Merge branch 'master' into events-2 2024-01-04 19:02:00 -06:00
eval.rs remove async-channel now that context and eval is global 2024-01-15 11:46:00 -06:00
event_handlers.rs Fix non tokio builds for desktop 2024-01-18 04:07:28 -08:00
events.rs Clean up shared context in desktop 2024-01-05 12:37:47 -08:00
file_upload.rs Clean up desktop even more 2024-01-04 18:19:28 -08:00
hooks.rs cargo check all 2024-01-23 16:58:29 -08:00
index.html Clean up and document the protocol handler 2024-01-04 19:52:49 -08:00
ipc.rs Document ipc a bit 2024-01-04 20:28:57 -08:00
launch.rs Fix generational box in release mode 2024-01-21 12:46:19 -08:00
lib.rs Fix non tokio builds for desktop 2024-01-18 04:07:28 -08:00
menubar.rs fix duplicate window menu in the default menubar 2024-01-25 17:23:06 -06:00
mobile_shortcut.rs fix ios build of desktop 2024-01-05 23:59:44 -08:00
protocol.rs Remove logging in protocol 2024-01-21 14:58:27 -08:00
query.rs Fix non tokio builds for desktop 2024-01-18 04:07:28 -08:00
readme.md remove cx.render 2024-01-13 21:12:21 -08:00
shortcut.rs Fix non tokio builds for desktop 2024-01-18 04:07:28 -08:00
waker.rs A few more stylistic changes 2024-01-04 20:41:48 -08:00
webview.rs Merge branch 'master' into breaking 2024-01-30 16:20:19 -08:00

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() -> Element {
    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!