Jonathan Kelley 58b0519c2f feat: get interpreter working on desktop 2 gadi atpakaļ
..
assets e3e5f22bc7 feat: move `default_icon` to assets 3 gadi atpakaļ
cfg.rs f84166fb11 allow configering the root name in the desktop renderer 2 gadi atpakaļ
controller.rs 58b0519c2f feat: get interpreter working on desktop 2 gadi atpakaļ
desktop_context.rs bf47f64852 Merge branch 'upstream' into return-from-js 2 gadi atpakaļ
escape.rs d9546d9504 Renderers are now packages, not features. (#387) 3 gadi atpakaļ
events.rs 58b0519c2f feat: get interpreter working on desktop 2 gadi atpakaļ
hot_reload.rs e8ae1fb83e chore: comment out hot reloading stuff 2 gadi atpakaļ
index.html 049976d23a feat: allow customizing the index and head 3 gadi atpakaļ
lib.rs c86cbd69da feat: move interpreter code into desktop 2 gadi atpakaļ
protocol.rs c86cbd69da feat: move interpreter code into desktop 2 gadi atpakaļ
readme.md d9546d9504 Renderers are now packages, not features. (#387) 3 gadi atpakaļ

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 keyboard shortcuts, 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 with the desktop feature:

$ cargo add dioxus --features 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!