dioxus-sdk

Crates.iodioxus-sdk
lib.rsdioxus-sdk
version
sourcesrc
created_at2024-04-04 03:10:48.672258
updated_at2024-12-07 22:32:50.388487
descriptionPlatform agnostic library for supercharging your productivity with Dioxus
homepagehttps://dioxuslabs.com
repositoryhttps://github.com/DioxusLabs/sdk/
max_upload_size
id1195802
Cargo.toml error:TOML parse error at line 24, column 1 | 24 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Marc Espin (marc2332)

documentation

README

🧰 Dioxus Development Kit 🚀

A platform agnostic library for supercharging your productivity with Dioxus.

Crates.io version Download docs.rs docs

This library is still under development. Expect breaking changes!


dioxus-sdk is a development kit for Dioxus that provides abstractions for your Dioxus app. Abstractions included are notifications, clipboard, geolocation and storage with more to come!

Features

  • Geolocation - (Web, Windows)
  • Storage - (Web, Desktop)
  • Clipboard - (Desktop)
  • Notifications - (Desktop)
  • Color Scheme - (Web)
  • Utility Hooks
    • use_channel
    • use_window_size
    • use_interval
    • use_debounce
    • use_timeout
  • Camera
  • WiFi
  • Bluetooth

Geolocation example:

use dioxus_sdk::geolocation::{
    init_geolocator, use_geolocation, PowerMode
};

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}" } )
      }
    }
}

Platform Support

Clipboard

On linux you need the x11 library to use the clipboard abstraction:

sudo apt-get install xorg-dev

Usage

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

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

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 by you, shall be licensed as MIT or Apache 2.0, without any additional terms or conditions.

Commit count: 81

cargo fmt