Crates.io | playdate-rs |
lib.rs | playdate-rs |
version | 0.0.15 |
source | src |
created_at | 2023-08-19 10:52:20.022111 |
updated_at | 2023-09-20 02:05:23.07766 |
description | Safe Rust bindings for the Playdate SDK C-CPI |
homepage | https://github.com/rusty-crank/playdate-rs |
repository | https://github.com/rusty-crank/playdate-rs |
max_upload_size | |
id | 948591 |
size | 179,985 |
Note: Prior to reaching v0.1.0, this is a work in progress. The API is incomplete, and breaking changes can occur frequently across versions.
Safe binding for the Playdate SDK C-API that:
Only works on Linux/macOS with the playdate simulator for now.
PLAYDATE_SDK_PATH
is correctly set.
cargo install playdate-cli
cargo playdate new hello-world
cd hello-world && cargo playdate run
Please refer to Playdate CLI docs for all the available CLI commands.
The cargo playdate build
command will automatically create a target/<profile>/<package_name>.pdx
folder that can run on the simulator. For the device build, it will be located at target/thumbv7em-none-eabihf/<profile>/<package_name>.pdx
.
Please put all assets files under the assets
folder in the project's root directory (the folder containing Cargo.toml
). The CLI will automatically copy all contents to the .pdx
folder. All supported resources will be transformed by the pdc
compiler.
For more details, please refer to the examples/hello-world project.
pdxinfo
generation and bundlingThe CLI will automatically generate a pdxinfo
file under the .pdx
folder. There are two ways to set the content of the pdxinfo
file:
Cargo.toml
). The CLI will automatically pick it up.[package.metadata.pdxinfo]
section in Cargo.toml
:[package.metadata.pdxinfo]
name = "Your game name" # Default value: package.name
author = "Your Name" # Default value: package.authors
description = "Your game description" # Default value: package.description
bundle_id = "com.your-game.bundle-id" # Default value: "com.example." + package.name
image_path = "image/path" # Default value: empty string
launch_sound_path = "launch/sound/path" # Default value: empty string
content_warning = "Content warning" # Default value: empty string
content_warning2 = "Content warning 2" # Default value: empty string
Note that all fields in [package.metadata.pdxinfo]
are optional. The default value will be derived from other fields in Cargo.toml
. Please refer to the # Default value
comments above.
Example: examples/hello-world/Cargo.toml.