MCPcopy Index your code
hub / github.com/DioxusLabs/sdk

github.com/DioxusLabs/sdk @v0.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.0 ↗ · + Follow
172 symbols 304 edges 34 files 71 documented · 41%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🧰 Dioxus Development Kit 🚀

Cross-platform crates for supercharging your productivity with Dioxus.

Crates.io version

Download

docs.rs docs


These crates are still under development. Expect breaking changes!

dioxus-sdk is a development kit for Dioxus that provides cross-platform APIs for your Dioxus app. SDK is organized into many different crates accessible through the dioxus-sdk crate with the corresponding feature flags.

Features

  • dioxus-sdk-storage
  • dioxus-sdk-geolocation - Web & Windows
  • dioxus-sdk-notifications - Desktop
  • dioxus-sdk-window
  • [x] Theme - (Web, Windows, Mac)
  • [x] Window Size
  • dioxus-sdk-time
  • [x] Sleep
  • [x] Intervals
  • [x] Debounce
  • [x] Timeouts
  • dioxus-sdk-sync
  • [x] Channels
  • dioxus-sdk-util
  • [x] use_root_scroll
  • [ ] Camera
  • [ ] WiFi
  • [ ] Bluetooth

Geolocation example:

// dioxus-sdk-geolocation= { version = "*" }
use dioxus::prelude::*;
use dioxus_sdk_geolocation::{
    init_geolocator, use_geolocation, PowerMode
};

#[component]
fn App() -> Element {
    let geolocator = init_geolocator(PowerMode::High).unwrap();
    let coords = use_geolocation();

    match coords {
      Ok(coords) => {
        rsx!( p { "Latitude: {coords.latitude} | Longitude: {coords.longitude}" } )
      }
      Err(Error::NotInitialized) => {
        rsx!( p { "Initializing..." } )
      }
      Err(e) => {
        rsx!( p { "An error occurred {e}" } )
      }
    }
}

Usage

You can add dioxus-sdk to your application by adding it to your dependencies.

[dependencies]
dioxus-sdk = { version = "0.6", features = [] }

Dioxus Compatibility

This table represents the compatibility between this crate and Dioxus versions. The crate version supports a Dioxus version up until the next crate version in the table.

E.g. if crate version 0.1 supported Dioxus 0.6 and crate version 0.4 supported Dioxus 0.7, crate versions 0.1, 0.2, and 0.3 would support Dioxus 0.6.

Crate Version Dioxus Version
0.7 0.7
0.6 0.6
0.5 0.5

License

This project is dual licensed under the MIT and Apache 2.0 licenses.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in dioxus-sdk or any of it's crates, by you, shall be licensed as MIT or Apache 2.0, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

StorageBacking (Interface)
A trait for a storage backing [4 implementers]
packages/storage/src/lib.rs
ReadableWindowSizeExt (Interface)
A trait for accessing the inner values of [`WindowSize`]. These methods can be convenient if you need access to one of [1 …
packages/window/src/size.rs
StorageEntryTrait (Interface)
A trait for common functionality between StorageEntry and SyncedStorageEntry [2 implementers]
packages/storage/src/lib.rs
StorageSubscriber (Interface)
A trait for a subscriber to events from a storage backing [2 implementers]
packages/storage/src/lib.rs

Core symbols most depended-on inside this repo

clone
called by 27
packages/time/src/timeout.rs
set
called by 21
packages/storage/src/client_storage/fs.rs
get
called by 10
packages/storage/src/client_storage/fs.rs
try_send
called by 9
packages/sync/src/channel/use_channel.rs
get
called by 8
packages/storage/src/client_storage/fs.rs
data
called by 5
packages/storage/src/lib.rs
send
called by 4
packages/sync/src/channel/use_channel.rs
save_to_storage_on_change
called by 3
packages/storage/src/lib.rs

Shape

Function 69
Method 63
Class 23
Enum 13
Interface 4

Languages

Rust100%

Modules by API surface

packages/storage/src/lib.rs35 symbols
packages/notification/src/lib.rs13 symbols
packages/geolocation/src/core.rs11 symbols
packages/window/src/size.rs10 symbols
packages/storage/src/client_storage/web.rs10 symbols
packages/storage/src/client_storage/fs.rs9 symbols
packages/storage/src/client_storage/memory.rs8 symbols
packages/window/src/theme.rs7 symbols
packages/time/src/timeout.rs7 symbols
packages/time/src/debounce.rs6 symbols
packages/sync/src/channel/use_channel.rs6 symbols
packages/geolocation/src/platform/windows.rs6 symbols

For agents

$ claude mcp add sdk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact