Crate dioxus_mobile

Source
Expand description

§Dioxus Mobile

Crates.io MIT licensed Build Status Discord chat

Website | Guides | API Docs | Chat

§Overview

dioxus-mobile is a re-export of dioxus-desktop with some minor tweaks and documentation changes. As this crate evolves, it will provide some more unique features to mobile, but for now, it’s very similar to the desktop crate.

Dioxus Mobile supports both iOS and Android. However, Android support is still quite experimental and requires a lot of configuration. A good area to contribute here would be to improve the CLI tool to include bundling and mobile configuration.

§Getting Set up

Getting set up with mobile can but quite challenging. The tooling here isn’t great (yet) and might take some hacking around to get things working. macOS M1 is broadly unexplored and might not work for you.

You can read our guide on mobile development with Dioxus to get started.

§Contributing

  • Report issues on our issue tracker.
  • Join the discord and ask questions!

§License

This project is licensed under the MIT license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you shall be licensed as MIT without any additional terms or conditions.

Modules§

launch
The main entrypoint for this crate
muda
muda is a Menu Utilities library for Desktop Applications.
tao
Tao is a cross-platform application window creation and event loop management library.
trayicon
tray icon
wry
Wry is a Cross-platform WebView rendering library.

Structs§

Config
The configuration for the desktop application.
DesktopService
An imperative interface to the current window.
LogicalPosition
A position represented in logical pixels.
LogicalSize
A size represented in logical pixels.
RequestAsyncResponder
Resolves a custom protocol Request asynchronously.
ShortcutHandle
An global id for a shortcut.
WindowBuilder
Object that allows you to build windows.
WryEventHandler
The unique identifier of a window event handler. This can be used to later remove the handler.

Enums§

HotKeyState
Describes the state of the HotKey.
ShortcutRegistryError
An error that can occur when registering a shortcut.
WindowCloseBehaviour
The behaviour of the application when the last window is closed.
WindowEvent
Describes an event from a Window.

Functions§

launch
Launch via the binding API
launch_cfg
use_asset_handler
Provide a callback to handle asset loading yourself.
use_global_shortcut
Get a closure that executes any JavaScript in the WebView context.
use_muda_event_handler
Register an event handler that runs when a muda event is processed.
use_tray_icon_event_handler
Register an event handler that runs when a tray icon event is processed. This is only for tray icon and not it’s menus. If you want to register tray icon menus handler use use_tray_menu_event_handler instead.
use_tray_menu_event_handler
Register an event handler that runs when a tray icon menu event is processed.
use_window
Get an imperative handle to the current window
use_wry_event_handler
Register an event handler that runs when a wry event is processed.
window
Get an imperative handle to the current window without using a hook

Type Aliases§

AssetRequest
A request for an asset within dioxus-desktop.
DesktopContext
A handle to the DesktopService that can be passed around.
WeakDesktopContext
A weak handle to the DesktopService to ensure safe passing. The problem without this is that the tao window is never dropped and therefore cannot be closed. This was due to the Rc that had still references because of multiple copies when creating a webview.