Skip to content

Commit

Permalink
SDK Rename (#31)
Browse files Browse the repository at this point in the history
* revision: readme

* revision: readme warning

* revision: note readme

* revision: update date

* revision: notice

* revision: rename to sdk

* revision: description

* revision: geolocation example readme

* revision: title
  • Loading branch information
DogeDark committed Apr 5, 2024
1 parent d83fd9d commit bde83a2
Show file tree
Hide file tree
Showing 45 changed files with 53 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ jobs:
- run: rustup target add wasm32-unknown-unknown
- run: rustup component add clippy
- uses: actions/checkout@v3
- run: cargo clippy --package dioxus-std --target wasm32-unknown-unknown --tests --features wasm-testing -- -D warnings
- run: cargo clippy --package dioxus-std --tests --features desktop-testing -- -D warnings
- run: cargo clippy --package dioxus-sdk --target wasm32-unknown-unknown --tests --features wasm-testing -- -D warnings
- run: cargo clippy --package dioxus-sdk --tests --features desktop-testing -- -D warnings
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- run: rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- run: cargo build --package dioxus-std --verbose --target wasm32-unknown-unknown --no-default-features --features wasm-testing
- run: cargo build --package dioxus-sdk --verbose --target wasm32-unknown-unknown --no-default-features --features wasm-testing
# need to run tests here

desktop:
Expand All @@ -29,5 +29,5 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo build --package dioxus-std --verbose --no-default-features --features desktop-testing
- run: cargo test --package dioxus-std --verbose --no-default-features --features desktop-testing
- run: cargo build --package dioxus-sdk --verbose --no-default-features --features desktop-testing
- run: cargo test --package dioxus-sdk --verbose --no-default-features --features desktop-testing
19 changes: 9 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[workspace]
resolver = "2"
members = [
"std",
"examples/*",
]

[workspace.dependencies]
dioxus-std = { path = "./std" }
dioxus = { version = "0.5" }
[workspace]
resolver = "2"
members = ["sdk", "examples/*"]

[workspace.dependencies]
dioxus-sdk = { path = "./sdk" }
dioxus = { version = "0.5" }
dioxus-web = { version = "0.5" }
dioxus-desktop = { version = "0.5" }
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
<br/>

<div align="center">
<h1>🧰 Dioxus Standard Library 🚀</h1>
<h1>🧰 Dioxus Development Kit 🚀</h1>
<p><strong>A platform agnostic library for supercharging your productivity with Dioxus.</strong></p>
</div>

<div align="center">
<!-- Crates version -->
<a href="https://crates.io/crates/dioxus-std">
<img src="https://img.shields.io/crates/v/dioxus-std.svg?style=flat-square"
<a href="https://crates.io/crates/dioxus-sdk">
<img src="https://img.shields.io/crates/v/dioxus-sdk.svg?style=flat-square"
alt="Crates.io version" />
</a>
<!-- Downloads -->
<a href="https://crates.io/crates/dioxus-std">
<img src="https://img.shields.io/crates/d/dioxus-std.svg?style=flat-square"
<a href="https://crates.io/crates/dioxus-sdk">
<img src="https://img.shields.io/crates/d/dioxus-sdk.svg?style=flat-square"
alt="Download" />
</a>
<!-- docs -->
<a href="https://docs.rs/dioxus-std">
<a href="https://docs.rs/dioxus-sdk">
<img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square"
alt="docs.rs docs" />
</a>
Expand All @@ -32,7 +32,7 @@
<p align="center"><i>This library is still under development. Expect breaking changes!</i></p>
<br/>

`dioxus-std` is a Dioxus standard library that provides abstractions for your Dioxus app. Abstractions included are notifications, clipboard, geolocation and storage with more to come!
`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**
- [x] Geolocation - (Web, Windows)
Expand All @@ -51,7 +51,7 @@
Geolocation example:

```rust
use dioxus_std::geolocation::{
use dioxus_sdk::geolocation::{
init_geolocator, use_geolocation, PowerMode
};

Expand Down Expand Up @@ -82,15 +82,15 @@ sudo apt-get install xorg-dev
```

## Usage
You can add `dioxus-std` to your application by adding it to your dependencies.
You can add `dioxus-sdk` to your application by adding it to your dependencies.
```toml
[dependencies]
dioxus-std = { version = "0.5", features = [] }
dioxus-sdk= { version = "0.5", features = [] }
```

## License
This project is licensed under the [MIT license].

[mit license]: ./LICENSE

Every contribution intentionally submitted for inclusion in `dioxus-std` by you, shall be licensed as MIT, without any additional terms or conditions.
Every contribution intentionally submitted for inclusion in `dioxus-sdk` by you, shall be licensed as MIT, without any additional terms or conditions.
5 changes: 3 additions & 2 deletions examples/channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dioxus-std = { workspace = true, features = ["utils"]}
dioxus = { workspace = true, features = ["web"]}
dioxus-sdk = { workspace = true, features = ["utils"] }
dioxus = { workspace = true, features = ["web"] }


log = "0.4.6"

Expand Down
2 changes: 1 addition & 1 deletion examples/channel/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dioxus::prelude::*;
use dioxus_std::utils::channel::{use_channel, use_listen_channel};
use dioxus_sdk::utils::channel::{use_channel, use_listen_channel};

fn main() {
// init debug tool for WebAssembly
Expand Down
4 changes: 2 additions & 2 deletions examples/clipboard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dioxus-std = { workspace = true, features = ["clipboard"] }
dioxus = { workspace = true, features = ["desktop"]}
dioxus-sdk = { workspace = true, features = ["clipboard"] }
dioxus = { workspace = true, features = ["desktop"] }
2 changes: 1 addition & 1 deletion examples/clipboard/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dioxus::prelude::*;
use dioxus_std::clipboard::use_clipboard;
use dioxus_sdk::clipboard::use_clipboard;

fn main() {
launch(app);
Expand Down
2 changes: 1 addition & 1 deletion examples/color_scheme/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dioxus-std = { workspace = true, features = ["color_scheme"] }
dioxus-sdk = { workspace = true, features = ["color_scheme"] }
dioxus = { workspace = true, features = ["web"]}

log = "0.4.6"
Expand Down
2 changes: 1 addition & 1 deletion examples/color_scheme/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dioxus::prelude::*;
use dioxus_std::color_scheme::use_preferred_color_scheme;
use dioxus_sdk::color_scheme::use_preferred_color_scheme;

fn main() {
// init debug tool for WebAssembly
Expand Down
3 changes: 2 additions & 1 deletion examples/geolocation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dioxus-std = { workspace = true, features = ["geolocation"] }
dioxus-sdk = { workspace = true, features = ["geolocation"] }
# You can change from 'desktop' to 'web' as well
dioxus = { workspace = true, features = ["desktop"] }

2 changes: 1 addition & 1 deletion examples/geolocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Learn how to use the `geolocation` abstraction.

Run:

```cargo run```
```dx serve```
2 changes: 1 addition & 1 deletion examples/geolocation/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dioxus::prelude::*;
use dioxus_std::geolocation::{init_geolocator, use_geolocation, PowerMode};
use dioxus_sdk::geolocation::{init_geolocator, use_geolocation, PowerMode};

fn main() {
launch(app);
Expand Down
2 changes: 1 addition & 1 deletion examples/i18n/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dioxus-std = { workspace = true, features = ["i18n"] }
dioxus-sdk = { workspace = true, features = ["i18n"] }
dioxus = { workspace = true, features = ["web"] }

log = "0.4.6"
Expand Down
4 changes: 2 additions & 2 deletions examples/i18n/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dioxus::prelude::*;
use dioxus_std::i18n::*;
use dioxus_std::translate;
use dioxus_sdk::i18n::*;
use dioxus_sdk::translate;
use std::str::FromStr;

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
dioxus-std = { workspace = true, features = ["storage"] }
dioxus-sdk = { workspace = true, features = ["storage"] }
dioxus = { workspace = true, features = ["router"] }

[features]
Expand Down
4 changes: 2 additions & 2 deletions examples/storage/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use dioxus::prelude::*;
use dioxus_router::prelude::*;
use dioxus_std::storage::*;
use dioxus_sdk::storage::*;

fn main() {
dioxus_std::storage::set_dir!();
dioxus_sdk::storage::set_dir!();
launch(app);
}

Expand Down
4 changes: 2 additions & 2 deletions std/Cargo.toml → sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "dioxus-std"
name = "dioxus-sdk"
version = "0.5.0"
authors = ["Jonathan Kelley", "Dioxus Labs", "ealmloff", "DogeDark", "marc2332"]
edition = "2021"
description = "Platform agnostic library for supercharging your productivity with Dioxus"
license = "MIT"
readme = "../README.md"
repository = "https://github.com/DioxusLabs/dioxus-std/"
repository = "https://github.com/DioxusLabs/dioxus-sdk/"
homepage = "https://dioxuslabs.com"
keywords = ["dom", "gui", "dioxus", "standard", "hooks"]
categories = ["multimedia", "os", "wasm"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl UseClipboard {
/// # Examples
///
/// ```ignore
/// use dioxus_std::clipboard::use_clipboard;
/// use dioxus_sdk::clipboard::use_clipboard;
///
/// // Get a handle to the clipboard
/// let mut clipboard = use_clipboard();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fmt;
/// # Examples
///
/// ```
/// use dioxus_std::notification::Notification;
/// use dioxus_sdk::notification::Notification;
///
/// Notification::new()
/// .app_name("dioxus test".to_string())
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/// Set the directory where the storage files are located on non-wasm targets.
///
/// ```rust
/// use dioxus_std::set_dir;
/// use dioxus_sdk::set_dir;
///
/// fn main(){
/// // set the directory to the default location
/// set_dir!();
/// }
/// ```
/// ```rust
/// use dioxus_std::set_dir;
/// use dioxus_sdk::set_dir;
///
/// fn main(){
/// // set the directory to a custom location
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions std/src/storage/mod.rs → sdk/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! A library for handling local storage ergonomically in Dioxus
//! ## Usage
//! ```rust
//! use dioxus_std::storage::use_persistent;
//! use dioxus_sdk::storage::use_persistent;
//! use dioxus::prelude::*;
//!
//! fn app() -> Element {
Expand Down Expand Up @@ -53,7 +53,7 @@ pub use client_storage::{set_dir_name, set_directory};
/// ## Usage
///
/// ```rust
/// use dioxus_std::storage::{use_storage, StorageBacking};
/// use dioxus_sdk::storage::{use_storage, StorageBacking};
/// use dioxus::prelude::*;
/// use dioxus_signals::Signal;
///
Expand All @@ -78,7 +78,7 @@ where
/// ## Usage
///
/// ```rust
/// use dioxus_std::storage::{new_storage, StorageBacking};
/// use dioxus_sdk::storage::{new_storage, StorageBacking};
/// use dioxus::prelude::*;
/// use dioxus_signals::Signal;
///
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bde83a2

Please sign in to comment.