diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 4fad8743..286ce444 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -25,6 +25,7 @@ env:
-p=playdate-display
-p=playdate-system
-p=playdate-sprite
+ -p=playdate
jobs:
api:
diff --git a/Cargo.lock b/Cargo.lock
index cf5e2802..e31348b2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -362,7 +362,7 @@ dependencies = [
[[package]]
name = "cargo-playdate"
-version = "0.2.5"
+version = "0.2.6"
dependencies = [
"anyhow",
"byteorder",
@@ -371,7 +371,7 @@ dependencies = [
"cargo-util",
"clap",
"clap_lex",
- "dirs 5.0.1",
+ "dirs",
"env_logger",
"fs_extra",
"log",
@@ -735,33 +735,13 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "dirs"
-version = "4.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
-dependencies = [
- "dirs-sys 0.3.7",
-]
-
[[package]]
name = "dirs"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
- "dirs-sys 0.4.1",
-]
-
-[[package]]
-name = "dirs-sys"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
-dependencies = [
- "libc",
- "redox_users",
- "winapi",
+ "dirs-sys",
]
[[package]]
@@ -2526,8 +2506,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
[[package]]
-name = "playdate-bindgen"
+name = "playdate"
version = "0.1.0"
+dependencies = [
+ "playdate-controls",
+ "playdate-display",
+ "playdate-fs",
+ "playdate-graphics",
+ "playdate-menu",
+ "playdate-sound",
+ "playdate-sprite",
+ "playdate-sys",
+ "playdate-system",
+]
+
+[[package]]
+name = "playdate-bindgen"
+version = "0.1.1"
dependencies = [
"bindgen",
"html2md",
@@ -2545,10 +2540,10 @@ dependencies = [
[[package]]
name = "playdate-build"
-version = "0.1.1"
+version = "0.1.2"
dependencies = [
"crate-metadata",
- "dirs 4.0.0",
+ "dirs",
"fs_extra",
"log",
"playdate-build-utils",
@@ -2562,43 +2557,43 @@ dependencies = [
[[package]]
name = "playdate-build-utils"
-version = "0.1.0"
+version = "0.1.1"
dependencies = [
- "dirs 5.0.1",
+ "dirs",
"log",
]
[[package]]
name = "playdate-color"
-version = "0.1.2"
+version = "0.1.3"
dependencies = [
"playdate-sys",
]
[[package]]
name = "playdate-controls"
-version = "0.1.3"
+version = "0.1.4"
dependencies = [
"playdate-sys",
]
[[package]]
name = "playdate-display"
-version = "0.1.2"
+version = "0.1.3"
dependencies = [
"playdate-sys",
]
[[package]]
name = "playdate-fs"
-version = "0.1.2"
+version = "0.1.3"
dependencies = [
"playdate-sys",
]
[[package]]
name = "playdate-graphics"
-version = "0.2.0"
+version = "0.2.1"
dependencies = [
"playdate-color",
"playdate-fs",
@@ -2607,14 +2602,14 @@ dependencies = [
[[package]]
name = "playdate-menu"
-version = "0.1.2"
+version = "0.1.3"
dependencies = [
"playdate-sys",
]
[[package]]
name = "playdate-sound"
-version = "0.1.2"
+version = "0.1.3"
dependencies = [
"playdate-fs",
"playdate-sys",
@@ -2622,7 +2617,7 @@ dependencies = [
[[package]]
name = "playdate-sprite"
-version = "0.1.1"
+version = "0.1.2"
dependencies = [
"playdate-graphics",
"playdate-sys",
@@ -2630,7 +2625,7 @@ dependencies = [
[[package]]
name = "playdate-sys"
-version = "0.1.9"
+version = "0.1.10"
dependencies = [
"heapless",
"playdate-bindgen",
@@ -2639,14 +2634,14 @@ dependencies = [
[[package]]
name = "playdate-system"
-version = "0.1.1"
+version = "0.1.2"
dependencies = [
"playdate-sys",
]
[[package]]
name = "playdate-tool"
-version = "0.1.1"
+version = "0.1.2"
dependencies = [
"clap",
"env_logger",
@@ -3045,9 +3040,9 @@ dependencies = [
[[package]]
name = "sha1"
-version = "0.10.5"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if",
"cpufeatures",
diff --git a/Cargo.toml b/Cargo.toml
index 23051a3b..57b77835 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,3 +8,42 @@ members = [
]
default-members = ["cargo", "support/tool"]
exclude = ["cargo/tests/crates/**/*"]
+
+
+[workspace.package]
+edition = "2021"
+license = "MIT OR Apache-2.0"
+authors = ["Alex Koz "]
+homepage = "https://github.com/boozook/playdate"
+repository = "https://github.com/boozook/playdate.git"
+
+
+[workspace.dependencies]
+color = { version = "0.1", path = "api/color", package = "playdate-color", default-features = false }
+ctrl = { version = "0.1", path = "api/ctrl", package = "playdate-controls", default-features = false }
+display = { version = "0.1", path = "api/display", package = "playdate-display", default-features = false }
+fs = { version = "0.1", path = "api/fs", package = "playdate-fs", default-features = false }
+gfx = { version = "0.2", path = "api/gfx", package = "playdate-graphics", default-features = false }
+menu = { version = "0.1", path = "api/menu", package = "playdate-menu", default-features = false }
+sound = { version = "0.1", path = "api/sound", package = "playdate-sound", default-features = false }
+sprite = { version = "0.1", path = "api/sprite", package = "playdate-sprite", default-features = false }
+system = { version = "0.1", path = "api/system", package = "playdate-system", default-features = false }
+sys = { version = "0.1", path = "api/sys", package = "playdate-sys", default-features = false }
+
+build = { version = "0.1", path = "support/build", package = "playdate-build", default-features = false }
+utils = { version = "0.1", path = "support/utils", package = "playdate-build-utils", default-features = false }
+bindgen = { version = "0.1", path = "support/bindgen", package = "playdate-bindgen", default-features = false }
+tool = { version = "0.1", path = "support/tool", package = "playdate-tool" }
+
+# Deps that used multiple times,
+# This is to prevent various versions in the deps-tree for faster compilation time
+dirs = "5.0"
+fs_extra = "1.3"
+semver = "1.0"
+regex = "1"
+log = "0.4"
+env_logger = "0.10"
+clap = "4.3"
+serde = "1.0"
+serde_json = "1.0"
+toml = "0.7"
diff --git a/README.md b/README.md
index 75c8f8ec..40a65b2f 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ This project allows you to create games for the [Playdate handheld gaming system
- [cargo-playdate][cargo-dir] - one-button solution to build, package and run programs
* [Modular low- & high- level API][api-dir]
- with [examples][ctrl-examples-dir]
+* __All the parts of API are accumulated in [One Crate][playdate-crate]__ ([git][playdate-crate-git])
Welcome to [discussions][] and [issues][] for any questions and suggestions.
Take a look at [videos](#demo) or [do something great](#usage).
@@ -61,8 +62,9 @@ Thanks to the modular structure of the system, you can use all or only the parts
### Create a Game
-1. Add [API-components][api-dir] as dependencies to your project
-1. Install [cargo-playdate][] to build your project
+1. Add [playdate crate][playdate-crate] as dependencies to your project
+ - Or/and [API-components][api-dir]
+2. Install [cargo-playdate][] to build your project
### Create an API-extension
@@ -86,10 +88,12 @@ There is all needed to find SDK and arm-gnu toolchain on user's system, build fl
+[playdate-crate]: https://crates.io/crates/playdate
[playdate-sys]: https://crates.io/crates/playdate-sys
[cargo-playdate]: https://crates.io/crates/cargo-playdate
[playdate-bindgen]: https://crates.io/crates/playdate-bindgen
+[playdate-crate-git]: https://github.com/boozook/playdate/blob/main/api/playdate
[support-dir]: https://github.com/boozook/playdate/tree/main/support
[cargo-dir]: https://github.com/boozook/playdate/tree/main/cargo
[api-dir]: https://github.com/boozook/playdate/tree/main/api
diff --git a/api/color/Cargo.toml b/api/color/Cargo.toml
index c7ef18d8..448b613e 100644
--- a/api/color/Cargo.toml
+++ b/api/color/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-color"
-version = "0.1.2"
-edition = "2021"
-
+version = "0.1.3"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level color API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "graphics", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -35,9 +34,7 @@ bindings-documentation = ["sys/bindings-documentation"]
[dependencies.sys]
-version = "0.1"
-path = "../sys"
-package = "playdate-sys"
+workspace = true
default-features = false
diff --git a/api/ctrl/Cargo.toml b/api/ctrl/Cargo.toml
index 613c1e5d..c90484ab 100644
--- a/api/ctrl/Cargo.toml
+++ b/api/ctrl/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-controls"
-version = "0.1.3"
-edition = "2021"
-
+version = "0.1.4"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level controls API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]
[dependencies.sys]
-path = "../sys"
-version = "0.1"
-package = "playdate-sys"
+workspace = true
default-features = false
diff --git a/api/display/Cargo.toml b/api/display/Cargo.toml
index 5e6cf9da..5ca706bc 100644
--- a/api/display/Cargo.toml
+++ b/api/display/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-display"
-version = "0.1.2"
-edition = "2021"
-
+version = "0.1.3"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level Display API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]
[dependencies.sys]
-version = "0.1"
-path = "../sys"
-package = "playdate-sys"
+workspace = true
default-features = false
diff --git a/api/fs/Cargo.toml b/api/fs/Cargo.toml
index cf060668..a8db667a 100644
--- a/api/fs/Cargo.toml
+++ b/api/fs/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-fs"
-version = "0.1.2"
-edition = "2021"
-
+version = "0.1.3"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level file-system API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "filesystem", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]
[dependencies.sys]
-path = "../sys"
-version = "0.1"
-package = "playdate-sys"
+workspace = true
default-features = false
diff --git a/api/gfx/Cargo.toml b/api/gfx/Cargo.toml
index dcde3482..359880bb 100644
--- a/api/gfx/Cargo.toml
+++ b/api/gfx/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-graphics"
-version = "0.2.0"
-edition = "2021"
-
+version = "0.2.1"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level graphics API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "rendering::graphics-api", "graphics", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -35,25 +34,10 @@ bindings-derive-constparamty = ["sys/bindings-derive-constparamty", "color/bindi
bindings-documentation = ["sys/bindings-documentation", "color/bindings-documentation", "fs/bindings-documentation"]
-[dependencies.sys]
-path = "../sys"
-version = "0.1"
-package = "playdate-sys"
-default-features = false
-
-# used: Error and Path
-[dependencies.fs]
-path = "../fs"
-version = "0.1"
-package = "playdate-fs"
-default-features = false
-
-# used: Color
-[dependencies.color]
-path = "../color"
-version = "0.1"
-package = "playdate-color"
-default-features = false
+[dependencies]
+sys = { workspace = true, default-features = false }
+fs = { workspace = true, default-features = false }
+color = { workspace = true, default-features = false }
[[example]]
diff --git a/api/menu/Cargo.toml b/api/menu/Cargo.toml
index 6b33a102..82f5b0cc 100644
--- a/api/menu/Cargo.toml
+++ b/api/menu/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-menu"
-version = "0.1.2"
-edition = "2021"
-
+version = "0.1.3"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level system menu API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]
[dependencies.sys]
-version = "0.1"
-path = "../sys"
-package = "playdate-sys"
+workspace = true
default-features = false
diff --git a/api/playdate/Cargo.toml b/api/playdate/Cargo.toml
new file mode 100644
index 00000000..d1cf98d8
--- /dev/null
+++ b/api/playdate/Cargo.toml
@@ -0,0 +1,247 @@
+[package]
+name = "playdate"
+version = "0.1.0"
+readme = "README.md"
+description = "High-level Playdate API"
+keywords = ["playdate", "sdk", "api", "gamedev"]
+categories = ["game-development", "api-bindings", "no-std"]
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
+
+
+[dependencies]
+ctrl = { workspace = true, default-features = false }
+display = { workspace = true, default-features = false }
+fs = { workspace = true, default-features = false }
+gfx = { workspace = true, default-features = false }
+menu = { workspace = true, default-features = false }
+sound = { workspace = true, default-features = false }
+sprite = { workspace = true, default-features = false }
+system = { workspace = true, default-features = false }
+sys = { workspace = true, default-features = false }
+
+
+# I have to do something with this ugly thing #
+[features]
+default = [
+ "sys/default",
+ "ctrl/default",
+ "display/default",
+ "fs/default",
+ "gfx/default",
+ "menu/default",
+ "sound/default",
+ "sprite/default",
+ "system/default",
+]
+lang-items = [
+ "sys/lang-items",
+ "ctrl/lang-items",
+ "display/lang-items",
+ "fs/lang-items",
+ "gfx/lang-items",
+ "menu/lang-items",
+ "sound/lang-items",
+ "sprite/lang-items",
+ "system/lang-items",
+]
+allocator = [
+ "sys/allocator",
+ "ctrl/allocator",
+ "display/allocator",
+ "fs/allocator",
+ "gfx/allocator",
+ "menu/allocator",
+ "sound/allocator",
+ "sprite/allocator",
+ "system/allocator",
+]
+panic-handler = [
+ "sys/panic-handler",
+ "ctrl/panic-handler",
+ "display/panic-handler",
+ "fs/panic-handler",
+ "gfx/panic-handler",
+ "menu/panic-handler",
+ "sound/panic-handler",
+ "sprite/panic-handler",
+ "system/panic-handler",
+]
+eh-personality = [
+ "sys/eh-personality",
+ "ctrl/eh-personality",
+ "display/eh-personality",
+ "fs/eh-personality",
+ "gfx/eh-personality",
+ "menu/eh-personality",
+ "sound/eh-personality",
+ "sprite/eh-personality",
+ "system/eh-personality",
+]
+error-ctx = [
+ "sys/error-ctx",
+ "ctrl/error-ctx",
+ "display/error-ctx",
+ "fs/error-ctx",
+ "gfx/error-ctx",
+ "menu/error-ctx",
+ "sound/error-ctx",
+ "sprite/error-ctx",
+ "system/error-ctx",
+]
+bindgen-runtime = [
+ "sys/bindgen-runtime",
+ "ctrl/bindgen-runtime",
+ "display/bindgen-runtime",
+ "fs/bindgen-runtime",
+ "gfx/bindgen-runtime",
+ "menu/bindgen-runtime",
+ "sound/bindgen-runtime",
+ "sprite/bindgen-runtime",
+ "system/bindgen-runtime",
+]
+bindgen-static = [
+ "sys/bindgen-static",
+ "ctrl/bindgen-static",
+ "display/bindgen-static",
+ "fs/bindgen-static",
+ "gfx/bindgen-static",
+ "menu/bindgen-static",
+ "sound/bindgen-static",
+ "sprite/bindgen-static",
+ "system/bindgen-static",
+]
+bindings-derive-default = [
+ "sys/bindings-derive-default",
+ "ctrl/bindings-derive-default",
+ "display/bindings-derive-default",
+ "fs/bindings-derive-default",
+ "gfx/bindings-derive-default",
+ "menu/bindings-derive-default",
+ "sound/bindings-derive-default",
+ "sprite/bindings-derive-default",
+ "system/bindings-derive-default",
+]
+bindings-derive-eq = [
+ "sys/bindings-derive-eq",
+ "ctrl/bindings-derive-eq",
+ "display/bindings-derive-eq",
+ "fs/bindings-derive-eq",
+ "gfx/bindings-derive-eq",
+ "menu/bindings-derive-eq",
+ "sound/bindings-derive-eq",
+ "sprite/bindings-derive-eq",
+ "system/bindings-derive-eq",
+]
+bindings-derive-copy = [
+ "sys/bindings-derive-copy",
+ "ctrl/bindings-derive-copy",
+ "display/bindings-derive-copy",
+ "fs/bindings-derive-copy",
+ "gfx/bindings-derive-copy",
+ "menu/bindings-derive-copy",
+ "sound/bindings-derive-copy",
+ "sprite/bindings-derive-copy",
+ "system/bindings-derive-copy",
+]
+bindings-derive-debug = [
+ "sys/bindings-derive-debug",
+ "ctrl/bindings-derive-debug",
+ "display/bindings-derive-debug",
+ "fs/bindings-derive-debug",
+ "gfx/bindings-derive-debug",
+ "menu/bindings-derive-debug",
+ "sound/bindings-derive-debug",
+ "sprite/bindings-derive-debug",
+ "system/bindings-derive-debug",
+]
+bindings-derive-hash = [
+ "sys/bindings-derive-hash",
+ "ctrl/bindings-derive-hash",
+ "display/bindings-derive-hash",
+ "fs/bindings-derive-hash",
+ "gfx/bindings-derive-hash",
+ "menu/bindings-derive-hash",
+ "sound/bindings-derive-hash",
+ "sprite/bindings-derive-hash",
+ "system/bindings-derive-hash",
+]
+bindings-derive-ord = [
+ "sys/bindings-derive-ord",
+ "ctrl/bindings-derive-ord",
+ "display/bindings-derive-ord",
+ "fs/bindings-derive-ord",
+ "gfx/bindings-derive-ord",
+ "menu/bindings-derive-ord",
+ "sound/bindings-derive-ord",
+ "sprite/bindings-derive-ord",
+ "system/bindings-derive-ord",
+]
+bindings-derive-partialeq = [
+ "sys/bindings-derive-partialeq",
+ "ctrl/bindings-derive-partialeq",
+ "display/bindings-derive-partialeq",
+ "fs/bindings-derive-partialeq",
+ "gfx/bindings-derive-partialeq",
+ "menu/bindings-derive-partialeq",
+ "sound/bindings-derive-partialeq",
+ "sprite/bindings-derive-partialeq",
+ "system/bindings-derive-partialeq",
+]
+bindings-derive-partialord = [
+ "sys/bindings-derive-partialord",
+ "ctrl/bindings-derive-partialord",
+ "display/bindings-derive-partialord",
+ "fs/bindings-derive-partialord",
+ "gfx/bindings-derive-partialord",
+ "menu/bindings-derive-partialord",
+ "sound/bindings-derive-partialord",
+ "sprite/bindings-derive-partialord",
+ "system/bindings-derive-partialord",
+]
+bindings-derive-constparamty = [
+ "sys/bindings-derive-constparamty",
+ "ctrl/bindings-derive-constparamty",
+ "display/bindings-derive-constparamty",
+ "fs/bindings-derive-constparamty",
+ "gfx/bindings-derive-constparamty",
+ "menu/bindings-derive-constparamty",
+ "sound/bindings-derive-constparamty",
+ "sprite/bindings-derive-constparamty",
+ "system/bindings-derive-constparamty",
+]
+bindings-documentation = [
+ "sys/bindings-documentation",
+ "ctrl/bindings-documentation",
+ "display/bindings-documentation",
+ "fs/bindings-documentation",
+ "gfx/bindings-documentation",
+ "menu/bindings-documentation",
+ "sound/bindings-documentation",
+ "sprite/bindings-documentation",
+ "system/bindings-documentation",
+]
+
+
+[package.metadata.docs.rs]
+all-features = false
+features = [
+ "bindings-derive-default",
+ "bindings-derive-eq",
+ "bindings-derive-copy",
+ "bindings-derive-debug",
+ "bindings-derive-hash",
+ "bindings-derive-ord",
+ "bindings-derive-partialeq",
+ "bindings-derive-partialord",
+]
+rustdoc-args = ["--cfg", "docsrs", "--show-type-layout"]
+default-target = "thumbv7em-none-eabihf"
+cargo-args = [
+ "-Zunstable-options",
+ "-Zrustdoc-scrape-examples",
+ "-Zbuild-std=core,alloc",
+]
diff --git a/api/playdate/README.md b/api/playdate/README.md
new file mode 100644
index 00000000..d440e3a9
--- /dev/null
+++ b/api/playdate/README.md
@@ -0,0 +1,96 @@
+# PlayDate API
+
+Mostly high-level rusty API for the [Playdate handheld gaming system][playdate-website].
+
+Usage with [cargo-playdate][cargo-playdate-crate] is strongly recommended.
+
+
+[cargo-playdate-crate]: https://crates.io/crates/cargo-playdate
+[playdate-website]: https://play.date/
+
+
+## What's inside
+
+### Covered parts of API:
+
+- [controls](https://crates.io/crates/playdate-controls)
+- [display](https://crates.io/crates/playdate-display)
+- [file system](https://crates.io/crates/playdate-fs)
+- [graphics](https://crates.io/crates/playdate-graphics) (with [color](https://crates.io/crates/playdate-color))
+- [sound](https://crates.io/crates/playdate-sound)
+- [sprite](https://crates.io/crates/playdate-sprite)
+- [system](https://crates.io/crates/playdate-system) (with [menu](https://crates.io/crates/playdate-menu))
+- [sys](https://crates.io/crates/playdate-sys) - base, low-level cffi bindings
+
+Plus some extensions to make it all more rust-ish.
+
+
+### Not yet covered parts:
+
+- scoreboards
+- json
+- lua
+
+Also __there is no default entry-point__ (read as event-handler) for your application.
+Not yet, I'm working on it.
+
+
+## How to start
+
+Currently there is no any beautiful HL examples ready yet.
+It will be in v0.2.0 or little bit earlier as well as default entry-point that mentioned above.
+
+### Prerequisites
+
+Follow the instructions for:
+1. [SDK](https://sdk.play.date/Inside%20Playdate%20with%20C.html#_prerequisites)
+1. [cargo-playdate](https://github.com/boozook/playdate/blob/main/cargo/README.md#prerequisites)
+1. [playdate-sys](https://github.com/boozook/playdate/tree/main/api/sys#prerequisites) (prerequisites only)
+
+
+### Hello World
+
+> Note, this is incomplete and not-so production-ready crate.
+>
+> As minimum currently you'll need to implement missed entry-point for your program by yourself.
+> But you can find some examples with ugly & primitive entry-point impl,
+> so you'll need to add something like [this code][ugly-entry-point] to your program.
+>
+> Here is [list of missed parts that not ready yet](#not-yet-covered-parts).
+
+[ugly-entry-point]: https://github.com/boozook/playdate/blob/main/api/sys/examples/hello-world.rs#L97-L138
+
+#### Short Way
+
+1. Install [cargo-playdate][].
+1. `cd where/your/project/will/be`
+1. `cargo playdate init --lib --full-metadata --deps="playdate"` ([more about it][cargo-playdate-hw])
+1. `cargo playdate run`
+
+Done. Now take a look at long way below for details what's happen.
+
+#### Alternative Way
+
+Just run `cargo new ` and add do following:
+1. Add [playdate crate][playdate-crate] as dependency to your project
+1. `#![no_std]` for library, or `#![no_std] #![no_main]` for executable binary
+1. Look at existing example for api-parts [like that][sprite-examples]
+1. Add minimally required metadata to build package:
+ - `package.metadata.playdate.bundle-id = "com.yourcompany.game"`
+ - Read about [playdate metadata format][] if needed
+1. Install [cargo-playdate][] to build your project
+1. Run `cargo playdate run`
+1. Help this project somehow.
+
+
+❤️🔥
+
+
+[sprite-examples]: https://github.com/boozook/playdate/tree/main/api/sprite/examples
+[cargo-playdate]: https://crates.io/crates/cargo-playdate
+[cargo-playdate-hw]: https://github.com/boozook/playdate/tree/main/cargo#hello-world
+[playdate metadata format]: https://github.com/boozook/playdate/tree/main/support/build#metadata
+
+- - -
+
+This software is not sponsored or supported by Panic.
diff --git a/api/playdate/src/lib.rs b/api/playdate/src/lib.rs
new file mode 100644
index 00000000..8abbc148
--- /dev/null
+++ b/api/playdate/src/lib.rs
@@ -0,0 +1,29 @@
+#![cfg_attr(not(test), no_std)]
+
+extern crate alloc;
+extern crate sys;
+
+pub extern crate menu;
+pub extern crate display;
+pub extern crate ctrl as controls;
+pub extern crate gfx as graphics;
+
+pub mod system {
+ pub use system::*;
+ pub use menu;
+}
+
+pub mod sound {
+ pub use sound::*;
+ pub use sound::prelude::*;
+}
+
+pub mod sprite {
+ pub use sprite::*;
+ pub use sprite::prelude::*;
+}
+
+pub mod fs {
+ pub use fs::*;
+ pub use fs::prelude::*;
+}
diff --git a/api/sound/Cargo.toml b/api/sound/Cargo.toml
index 93fcdfde..33f1152d 100644
--- a/api/sound/Cargo.toml
+++ b/api/sound/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-sound"
-version = "0.1.2"
-edition = "2021"
-
+version = "0.1.3"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level sound API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "multimedia::audio", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -35,17 +34,9 @@ bindings-derive-constparamty = ["sys/bindings-derive-constparamty", "fs/bindings
bindings-documentation = ["sys/bindings-documentation", "fs/bindings-documentation"]
-[dependencies.sys]
-path = "../sys"
-version = "0.1"
-package = "playdate-sys"
-default-features = false
-
-[dependencies.fs]
-path = "../fs"
-version = "0.1"
-package = "playdate-fs"
-default-features = false
+[dependencies]
+sys = { workspace = true, default-features = false }
+fs = { workspace = true, default-features = false }
[[example]]
diff --git a/api/sprite/Cargo.toml b/api/sprite/Cargo.toml
index 1f0f2a3b..20b7af34 100644
--- a/api/sprite/Cargo.toml
+++ b/api/sprite/Cargo.toml
@@ -1,11 +1,7 @@
[package]
name = "playdate-sprite"
-version = "0.1.1"
-edition = "2021"
-
+version = "0.1.2"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level sprite API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = [
@@ -15,8 +11,11 @@ categories = [
"graphics",
"no-std",
]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -59,17 +58,9 @@ bindings-documentation = [
]
-[dependencies.sys]
-version = "0.1"
-path = "../sys"
-package = "playdate-sys"
-default-features = false
-
-[dependencies.gfx]
-version = "0.2"
-path = "../gfx"
-package = "playdate-graphics"
-default-features = false
+[dependencies]
+sys = { workspace = true, default-features = false }
+gfx = { workspace = true, default-features = false }
[[example]]
diff --git a/api/sys/Cargo.toml b/api/sys/Cargo.toml
index 224eae82..faf9412a 100644
--- a/api/sys/Cargo.toml
+++ b/api/sys/Cargo.toml
@@ -1,12 +1,8 @@
[package]
name = "playdate-sys"
-version = "0.1.9"
-edition = "2021"
+version = "0.1.10"
build = "src/build.rs"
-
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "Low-level Playdate API bindings"
keywords = ["playdate", "bindings", "ffi", "gamedev"]
categories = [
@@ -15,9 +11,11 @@ categories = [
"game-development",
"no-std"
]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
-documentation = "https://docs.rs/playdate-sys"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -34,7 +32,7 @@ panic-handler = [] # global panic handler
eh-personality = [] # eh_personality for sim-targets, dummy empty no-op
entry-point = [] # simple minimal proxy entry point
-error-ctx = [] # errors with context
+error-ctx = [] # errors with context (incomplete feature)
# bindings build options:
bindgen-logging = ["bindgen/logging"]
@@ -64,14 +62,13 @@ heapless = "0.7"
[build-dependencies]
-semver = "1.0"
+semver.workspace = true
# TODO: make bindgen optional:
# if no bindgen => use pre-built or find installed bindgen and call
[build-dependencies.bindgen]
-package = "playdate-bindgen"
-path = "../../support/bindgen"
-version = "0.1"
+# optional = true
+workspace = true
default-features = false
diff --git a/api/system/Cargo.toml b/api/system/Cargo.toml
index c503ac46..d903702d 100644
--- a/api/system/Cargo.toml
+++ b/api/system/Cargo.toml
@@ -1,16 +1,15 @@
[package]
name = "playdate-system"
-version = "0.1.1"
-edition = "2021"
-
+version = "0.1.2"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "High-level System API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
categories = ["game-development", "api-bindings", "no-std"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[features]
@@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]
[dependencies.sys]
-version = "0.1"
-path = "../sys"
-package = "playdate-sys"
+workspace = true
default-features = false
diff --git a/cargo/Cargo.toml b/cargo/Cargo.toml
index 22293d7e..af2e71b1 100644
--- a/cargo/Cargo.toml
+++ b/cargo/Cargo.toml
@@ -1,14 +1,8 @@
[package]
name = "cargo-playdate"
-version = "0.2.5"
-edition = "2021"
-
+version = "0.2.6"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "Build tool for neat yellow console."
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
keywords = ["playdate", "build", "cargo", "plugin", "cargo-subcommand"]
categories = [
"game-development",
@@ -17,6 +11,11 @@ categories = [
"development-tools::cargo-plugins",
"development-tools::build-utils",
]
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[[bin]]
@@ -29,45 +28,40 @@ once_cell = "1.18"
try-lazy-init = "0.0.2"
clap_lex = "0.5"
-dirs = "5.0"
-fs_extra = "1.3"
+dirs.workspace = true
+fs_extra.workspace = true
cargo = "=0.73.1"
cargo-util = "=0.2.5"
cargo-platform = "0.1.3"
-semver = "1.0"
-serde = { version = "1.0", features = ["derive"] }
-serde_json = "1.0"
-toml = "0.7"
+semver.workspace = true
+serde = { workspace = true, features = ["derive"] }
+serde_json.workspace = true
+toml.workspace = true
toml_edit = { version = "0.19", features = ["serde"] }
-regex = "1"
+regex.workspace = true
byteorder = "1.4"
zip = { version = "0.6.6", features = ["time"] }
walkdir = "2.3"
anyhow = "1.0"
termcolor = "1.2"
-env_logger = "0.10"
-log = "0.4"
+env_logger.workspace = true
+log.workspace = true
-[dependencies.playdate]
-version = "0.1"
-path = "../support/build"
-package = "playdate-build"
-features = ["assets-report", "toml"]
+[dependencies.build]
+workspace = true
default-features = false
+features = ["assets-report", "toml"]
[dependencies.tool]
-version = "=0.1.1" # TODO: relax semver when tool's api stabilized
-path = "../support/tool"
-package = "playdate-tool"
+workspace = true
features = ["clap", "cli"]
-
[dependencies.clap]
-version = "4.3"
+workspace = true
default-features = true
features = [
"default",
diff --git a/cargo/README.md b/cargo/README.md
index 97c2a0a7..4974d634 100644
--- a/cargo/README.md
+++ b/cargo/README.md
@@ -55,12 +55,17 @@ Generate new project using `new` or `init` command.
```bash
mkdir hello-world && cd $_
-cargo playdate init --lib --full-metadata --deps="sys:git, controls:git"
+cargo playdate init --lib --full-metadata --deps="playdate"
cargo playdate run
```
+> Note, there is more options for this commands, e.g. `--deps="sys:git, controls:git"`.
+> Run `cargo playdate new --help` for more about it.
+
New package will be created.
+
Take a look at the package manifest file (Cargo.toml).
+
There is extra metadata for your playdate package.
For more information about metadata read [documentation][metadata-readme].
@@ -68,9 +73,11 @@ For more information about metadata read [documentation][metadata-readme].
[metadata-readme]: https://github.com/boozook/playdate/blob/main/support/build/README.md#assets
+
## Configuration
diff --git a/cargo/src/cli/mod.rs b/cargo/src/cli/mod.rs
index 6e70d042..797c7fc3 100644
--- a/cargo/src/cli/mod.rs
+++ b/cargo/src/cli/mod.rs
@@ -13,7 +13,7 @@ use std::str::FromStr;
use clap::error::{ErrorKind, ContextKind, ContextValue};
use clap::{Arg, ArgMatches, FromArgMatches};
-use cargo::core::Workspace;
+use cargo::core::{Workspace, VirtualManifest, WorkspaceConfig, WorkspaceRootConfig};
use cargo::core::compiler::{CompileTarget, CompileKind};
use cargo::ops::CompileOptions;
use cargo::util::command_prelude::{ArgMatchesExt, CompileMode, ProfileChecking};
@@ -143,11 +143,36 @@ pub fn initialize_from(args: impl IntoIterator- + AsRe
)?;
- let workspace = matches.workspace(config)?;
+ let cmd = Cmd::try_from(name)?;
+
+ let workspace = if !matches!(cmd, Cmd::New | Cmd::Init) {
+ matches.workspace(config)?
+ } else {
+ // We should not create real ws for place where potentially nothing.
+ // So, lets create virtual one.
+ let cwd = env::current_dir()?;
+ let fake = cwd.join("Cargo.toml");
+ let fake_manifest =
+ VirtualManifest::new(
+ Default::default(),
+ Default::default(),
+ WorkspaceConfig::Root(WorkspaceRootConfig::new(
+ &cwd,
+ &Default::default(),
+ &Default::default(),
+ &Default::default(),
+ &Default::default(),
+ &Default::default(),
+ )),
+ Default::default(),
+ Default::default(),
+ Default::default(),
+ );
+ Workspace::new_virtual(cwd, fake, fake_manifest, config)?
+ };
log::debug!("ws target_dir: {:?}", workspace.target_dir().as_path_unlocked());
- let cmd = Cmd::try_from(name)?;
let mut compile_options = compile_options(&cmd, matches, &workspace)?;
// add extra targets by shorthands:
diff --git a/cargo/src/main.rs b/cargo/src/main.rs
index 5670240d..79ea95a6 100644
--- a/cargo/src/main.rs
+++ b/cargo/src/main.rs
@@ -5,6 +5,8 @@
#![feature(byte_slice_trim_ascii)]
#![feature(const_trait_impl)]
+extern crate build as playdate;
+
use std::borrow::Cow;
use anyhow::bail;
diff --git a/cargo/tests/build/simple.rs b/cargo/tests/build/simple.rs
index f75d933c..879b01c4 100644
--- a/cargo/tests/build/simple.rs
+++ b/cargo/tests/build/simple.rs
@@ -5,7 +5,7 @@ use std::path::PathBuf;
use std::process::Output;
use anyhow::Result;
-use playdate::consts::DEVICE_TARGET;
+use ::build::consts::DEVICE_TARGET;
use crate::common::*;
diff --git a/cargo/tests/common.rs b/cargo/tests/common.rs
index 78b70eb8..0882d76f 100644
--- a/cargo/tests/common.rs
+++ b/cargo/tests/common.rs
@@ -11,7 +11,7 @@ use std::process::Command;
use std::fmt::Display;
use anyhow::Result;
-pub use playdate::compile::dylib_suffix_for_host;
+pub use ::build::compile::dylib_suffix_for_host;
#[path = "./shared.rs"]
mod shared;
diff --git a/support/bindgen/Cargo.toml b/support/bindgen/Cargo.toml
index 4d24289c..80939cf4 100644
--- a/support/bindgen/Cargo.toml
+++ b/support/bindgen/Cargo.toml
@@ -1,21 +1,19 @@
[package]
name = "playdate-bindgen"
-version = "0.1.0"
-edition = "2021"
-
+version = "0.1.1"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "Bindgen configuration for Playdate API and utils."
keywords = ["playdate", "bindings", "ffi", "code-generation"]
categories = ["development-tools::ffi", "development-tools::build-utils"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
-documentation = "https://docs.rs/playdate-bindgen"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[dependencies]
-semver = "1.0"
+semver.workspace = true
# parser:
html2md = { version = "0.2.14", optional = true }
@@ -26,14 +24,11 @@ proc-macro2 = { version = "1.0.66", optional = true }
syn = { version = "2.0", optional = true }
quote = { version = "1.0", optional = true }
-log = { version = "0.4", optional = true }
+log = { workspace = true, optional = true }
prettyplease = { version = "0.2.7", optional = true, features = ["verbatim"] }
which = { version = "4.2.1", optional = true, default-features = false }
-[dependencies.playdate]
-package = "playdate-build-utils"
-path = "../utils"
-version = "0.1"
+utils.workspace = true
[dependencies.bindgen]
version = "=0.66.1"
@@ -48,7 +43,7 @@ extra-codegen = ["syn", "proc-macro2", "quote"]
# bindgen options
runtime = ["bindgen/runtime"] # runtime linking (dlopen)
static = ["bindgen/static"] # static linking to clang
-logging = ["bindgen/logging"]
+logging = ["bindgen/logging", "utils/log"]
pretty-please = ["bindgen/prettyplease", "prettyplease"]
which-rustfmt = ["bindgen/which-rustfmt", "which"]
diff --git a/support/bindgen/src/cfg.rs b/support/bindgen/src/cfg.rs
index aab87013..84e9f982 100644
--- a/support/bindgen/src/cfg.rs
+++ b/support/bindgen/src/cfg.rs
@@ -1,5 +1,5 @@
-use playdate::toolchain::gcc::ArmToolchain;
-use playdate::toolchain::sdk::Sdk;
+use utils::toolchain::gcc::ArmToolchain;
+use utils::toolchain::sdk::Sdk;
pub struct Config {
diff --git a/support/bindgen/src/error.rs b/support/bindgen/src/error.rs
index 1cd1b8e4..11822430 100644
--- a/support/bindgen/src/error.rs
+++ b/support/bindgen/src/error.rs
@@ -3,7 +3,7 @@ use std::io::Error as IoError;
use bindgen::BindgenError;
use semver::Error as SemverError;
-use playdate::toolchain::gcc::err::Error as GccError;
+use utils::toolchain::gcc::err::Error as GccError;
#[derive(Debug)]
diff --git a/support/bindgen/src/gen/docs/parser.rs b/support/bindgen/src/gen/docs/parser.rs
index a807a9ef..8bcefce2 100644
--- a/support/bindgen/src/gen/docs/parser.rs
+++ b/support/bindgen/src/gen/docs/parser.rs
@@ -19,7 +19,7 @@ use html5ever::tendril::TendrilSink;
use html5ever::tree_builder::TreeSink;
use markup5ever_rcdom::Handle;
use markup5ever_rcdom::SerializableHandle;
-use playdate::toolchain::sdk::Sdk;
+use utils::toolchain::sdk::Sdk;
use crate::Result;
use super::DocsMap;
diff --git a/support/bindgen/src/gen/mod.rs b/support/bindgen/src/gen/mod.rs
index 744a4b00..6f3bbf6a 100644
--- a/support/bindgen/src/gen/mod.rs
+++ b/support/bindgen/src/gen/mod.rs
@@ -1,7 +1,7 @@
#![cfg(feature = "extra-codegen")]
use std::io::Write;
use std::path::Path;
-use playdate::toolchain::sdk::Sdk;
+use utils::toolchain::sdk::Sdk;
use quote::ToTokens;
use proc_macro2::TokenStream;
diff --git a/support/bindgen/src/lib.rs b/support/bindgen/src/lib.rs
index bb6737d7..90f57798 100644
--- a/support/bindgen/src/lib.rs
+++ b/support/bindgen/src/lib.rs
@@ -5,9 +5,9 @@ use std::env;
use std::path::{Path, PathBuf};
use bindgen::callbacks::DeriveInfo;
use bindgen::{EnumVariation, RustTarget, Builder, MacroTypeVariation};
-use playdate::consts::*;
-use playdate::toolchain::gcc::ArmToolchain;
-use playdate::toolchain::sdk::Sdk;
+use utils::consts::*;
+use utils::toolchain::gcc::ArmToolchain;
+use utils::toolchain::sdk::Sdk;
pub mod error;
diff --git a/support/build/Cargo.toml b/support/build/Cargo.toml
index 1c6b55e1..ca38a366 100644
--- a/support/build/Cargo.toml
+++ b/support/build/Cargo.toml
@@ -1,47 +1,35 @@
[package]
name = "playdate-build"
-version = "0.1.1"
-edition = "2021"
-
+version = "0.1.2"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "Utils that help to build package for Playdate"
keywords = ["playdate", "package", "encoding", "manifest", "assets"]
categories = ["development-tools::build-utils"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
-documentation = "https://docs.rs/playdate-build"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[dependencies]
+log.workspace = true
# TODO: make serde optional!
-serde = { version = "1.0", features = ["derive"] }
-serde_json = { version = "1.0", optional = true }
-toml = { version = "0.7", optional = true }
-dirs = "4.0"
-fs_extra = "1.3"
-regex = "1"
+serde = { workspace = true, features = ["derive"] }
+serde_json = { workspace = true, optional = true }
+toml = { workspace = true, optional = true }
+dirs.workspace = true
+fs_extra.workspace = true
+regex.workspace = true
wax = "0.5"
-log = "0.4"
-
+symlink = "0.1"
[dependencies.crate-metadata]
version = "0.1"
optional = true
-
-[dependencies.symlink]
-package = "symlink"
-version = "0.1"
-# TODO: There's updated version in git, so fork or do something?
-# git = "https://gitlab.com/chris-morgan/symlink.git"
-
-
[dependencies.utils]
-package = "playdate-build-utils"
-path = "../utils"
-version = "0.1"
+workspace = true
default-features = false
features = ["log"]
diff --git a/support/tool/Cargo.toml b/support/tool/Cargo.toml
index 06cde84a..50f5f526 100644
--- a/support/tool/Cargo.toml
+++ b/support/tool/Cargo.toml
@@ -1,17 +1,15 @@
[package]
name = "playdate-tool"
-version = "0.1.1"
-edition = "2021"
-
+version = "0.1.2"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "Tool for interaction with Playdate device and sim."
keywords = ["playdate", "usb", "utility"]
categories = ["development-tools", "hardware-support"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
-documentation = "https://docs.rs/playdate-bindgen"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[[bin]]
@@ -21,40 +19,24 @@ required-features = ["cli"]
[dependencies]
-regex = "1"
-log = "0.4"
+regex.workspace = true
+log.workspace = true
+env_logger = { workspace = true, optional = true }
thiserror = "1.0"
-serde_json = "1.0"
+serde = { workspace = true, features = ["derive"] }
+serde_json.workspace = true
plist = "1.5"
+rusb = { version = "0.9", optional = true }
+usb-ids = { version = "1.2023.0", optional = true }
-[dependencies.serde]
-version = "1.0"
-features = ["derive"]
-
-[dependencies.env_logger]
-version = "0.10"
-optional = true
+# used assert::env-resolver and sdk
+build = { workspace = true, default-features = false }
[dependencies.clap]
-version = "4.3"
features = ["std", "env", "derive", "help", "usage", "color"]
-optional = true
-
-# used assert::env-resolver and sdk
-[dependencies.playdate]
-version = "0.1"
-path = "../build"
-package = "playdate-build"
-default-features = false
-
-[dependencies.rusb]
-version = "0.9"
-optional = true
-
-[dependencies.usb-ids]
-version = "1.2023.0"
+workspace = true
optional = true
diff --git a/support/tool/src/cli/commands/install.rs b/support/tool/src/cli/commands/install.rs
index bd73c794..f596f3e0 100644
--- a/support/tool/src/cli/commands/install.rs
+++ b/support/tool/src/cli/commands/install.rs
@@ -2,8 +2,8 @@ use std::path::PathBuf;
use std::time::Duration;
use std::process::Command;
-use playdate::toolchain::sdk::Sdk;
-use playdate::compile::PDX_PKG_EXT;
+use ::build::toolchain::sdk::Sdk;
+use ::build::compile::PDX_PKG_EXT;
use crate::Error;
use crate::OnDevicePath;
diff --git a/support/tool/src/cli/commands/mount.rs b/support/tool/src/cli/commands/mount.rs
index 900b2127..373ed236 100644
--- a/support/tool/src/cli/commands/mount.rs
+++ b/support/tool/src/cli/commands/mount.rs
@@ -1,7 +1,7 @@
use std::ffi::OsString;
use std::path::PathBuf;
-use playdate::toolchain::sdk::Sdk;
+use ::build::toolchain::sdk::Sdk;
use super::DeviceQuery;
use crate::Error;
diff --git a/support/tool/src/cli/commands/run.rs b/support/tool/src/cli/commands/run.rs
index 9ef6c0ab..3c358835 100644
--- a/support/tool/src/cli/commands/run.rs
+++ b/support/tool/src/cli/commands/run.rs
@@ -5,7 +5,7 @@ use std::process::Command;
use std::process::Stdio;
use std::time::Duration;
-use playdate::toolchain::sdk::Sdk;
+use ::build::toolchain::sdk::Sdk;
use crate::Error;
use crate::OnDevicePath;
diff --git a/support/tool/src/io/mod.rs b/support/tool/src/io/mod.rs
index 6518d879..303b0c18 100644
--- a/support/tool/src/io/mod.rs
+++ b/support/tool/src/io/mod.rs
@@ -14,7 +14,7 @@ impl Device {
#[cfg(feature = "usb")]
let res = crate::usb::write(self, command.as_ref()).map_err(Error::from);
#[cfg(not(feature = "usb"))]
- let res = Err(Error::Err("`usb` feature disabled"));
+ let res: Result<(), Error> = Err(Error::Err("`usb` feature disabled"));
res
};
@@ -41,7 +41,7 @@ impl Device {
#[cfg(feature = "usb")]
let res = crate::usb::read_output(self, echo).map_err(Error::from);
#[cfg(not(feature = "usb"))]
- let res = Err(Error::Err("`usb` feature disabled"));
+ let res: Result<(), Error> = Err(Error::Err("`usb` feature disabled"));
res
};
diff --git a/support/tool/src/mount.rs b/support/tool/src/mount.rs
index a8090385..a228a528 100644
--- a/support/tool/src/mount.rs
+++ b/support/tool/src/mount.rs
@@ -2,7 +2,7 @@ use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
-use playdate::toolchain::sdk::Sdk;
+use ::build::toolchain::sdk::Sdk;
use crate::Error;
use crate::model::Device;
@@ -30,7 +30,7 @@ impl Device {
pub fn mount_point(mount: &Path) -> Result {
- use playdate::assets::resolver::EnvResolver;
+ use ::build::assets::resolver::EnvResolver;
let path = mount.to_str()
.ok_or_else(|| Error::Error(format!("Mount point is not invalid utf-8: {}", mount.display())))
diff --git a/support/utils/Cargo.toml b/support/utils/Cargo.toml
index 07f9161b..2b46369d 100644
--- a/support/utils/Cargo.toml
+++ b/support/utils/Cargo.toml
@@ -1,22 +1,20 @@
[package]
name = "playdate-build-utils"
-version = "0.1.0"
-edition = "2021"
-
+version = "0.1.1"
readme = "README.md"
-license = "MIT OR Apache-2.0"
-authors = ["Alex Koz "]
description = "Utils that help to build program with Rust and Playdate API"
keywords = ["playdate", "utility"]
categories = ["development-tools::build-utils"]
-homepage = "https://github.com/boozook/playdate"
-repository = "https://github.com/boozook/playdate.git"
-documentation = "https://docs.rs/playdate-build-utils"
+edition.workspace = true
+license.workspace = true
+authors.workspace = true
+homepage.workspace = true
+repository.workspace = true
[dependencies]
-dirs = "5.0"
-log = { version = "0.4", optional = true }
+dirs.workspace = true
+log = { workspace = true, optional = true }
[features]