Skip to content

Commit

Permalink
Add main api crate (#96)
Browse files Browse the repository at this point in the history
* Add main api crate (#76)

* use `workspace.dependencies`

* improve documentation (#62)

* fix bug in `new` & `init` commands
  • Loading branch information
boozook authored Sep 21, 2023
1 parent 1924c4e commit 699ca54
Show file tree
Hide file tree
Showing 37 changed files with 660 additions and 313 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ env:
-p=playdate-display
-p=playdate-system
-p=playdate-sprite
-p=playdate
jobs:
api:
Expand Down
77 changes: 36 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
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"
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
17 changes: 7 additions & 10 deletions api/color/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
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]
Expand All @@ -35,9 +34,7 @@ bindings-documentation = ["sys/bindings-documentation"]


[dependencies.sys]
version = "0.1"
path = "../sys"
package = "playdate-sys"
workspace = true
default-features = false


Expand Down
17 changes: 7 additions & 10 deletions api/ctrl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
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]
Expand All @@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]


[dependencies.sys]
path = "../sys"
version = "0.1"
package = "playdate-sys"
workspace = true
default-features = false


Expand Down
17 changes: 7 additions & 10 deletions api/display/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
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]
Expand All @@ -36,9 +35,7 @@ bindings-documentation = ["sys/bindings-documentation"]


[dependencies.sys]
version = "0.1"
path = "../sys"
package = "playdate-sys"
workspace = true
default-features = false


Expand Down
Loading

0 comments on commit 699ca54

Please sign in to comment.