dioxus/packages/desktop/src
2024-01-08 13:39:03 -08:00
..
assets fix: Update logos and custom assets example (#960) 2023-04-15 08:02:04 -05:00
app.rs remove unused deps 2024-01-08 13:39:03 -08:00
assets.rs Call handlers from context of a runtime and scope 2024-01-05 17:35:37 -08:00
collect_assets.rs add logs when the desktop or fullstack application is collecting assets 2023-10-10 10:26:16 -05:00
config.rs Merge branch 'master' into add-file-data-drag-event 2024-01-08 13:34:24 -08:00
desktop_context.rs Add os-webview feature to wry to fix builds 2024-01-05 23:25:15 -08:00
edits.rs A few more stylistic changes 2024-01-04 20:41:48 -08:00
element.rs Merge branch 'master' into events-2 2024-01-04 19:02:00 -06:00
escape.rs Renderers are now packages, not features. (#387) 2022-07-09 15:15:20 -04:00
eval.rs Clean up desktop even more 2024-01-04 18:19: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 Call handlers from context of a runtime and scope 2024-01-05 17:35:37 -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 A few more stylistic changes 2024-01-04 20:41:48 -08:00
lib.rs Tweak menubar export 2024-01-05 23:52:37 -08:00
menubar.rs add window ext trait 2024-01-06 02:18:26 -08:00
mobile_shortcut.rs fix ios build of desktop 2024-01-05 23:59:44 -08:00
protocol.rs Finish asset handler 2024-01-05 18:08:04 -08:00
query.rs Merge branch 'master' into intigrate-collect-assets 2023-09-17 19:40:14 -05:00
readme.md Merge branch 'master' into intigrate-collect-assets 2023-09-17 19:40:14 -05:00
shortcut.rs Clean up shared context in desktop 2024-01-05 12:37:47 -08:00
waker.rs A few more stylistic changes 2024-01-04 20:41:48 -08:00
webview.rs fix merge 2024-01-08 14:51:35 -06: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(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!