Expand description
§Dioxus Mobile
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.
- Desktop
Service - An imperative interface to the current window.
- Logical
Position - A position represented in logical pixels.
- Logical
Size - A size represented in logical pixels.
- Request
Async Responder - Resolves a custom protocol
Requestasynchronously. - Shortcut
Handle - An global id for a shortcut.
- Window
Builder - Object that allows you to build windows.
- WryEvent
Handler - The unique identifier of a window event handler. This can be used to later remove the handler.
Enums§
- HotKey
State - Describes the state of the
HotKey. - Shortcut
Registry Error - An error that can occur when registering a shortcut.
- Window
Close Behaviour - The behaviour of the application when the last window is closed.
- Window
Event - 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_handlerinstead. - 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§
- Asset
Request - A request for an asset within dioxus-desktop.
- Desktop
Context - A handle to the
DesktopServicethat can be passed around. - Weak
Desktop Context - A weak handle to the
DesktopServiceto 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.