#playdate #gamedev #api-bindings

无std 应用 playdate-cli

playdate-rs的命令行工具

14个版本

0.0.15 2023年9月18日
0.0.14 2023年9月14日
0.0.10 2023年8月29日

#662 in 嵌入式开发

Download history 9/week @ 2024-03-11 7/week @ 2024-04-01

每月 123次下载

MIT/Apache

36KB
826

playdate-cli

playdate-rs的命令行工具。

通过运行以下命令安装: cargo install playdate-cli.

入门

  1. 确保环境变量 PLAYDATE_SDK_PATH 设置正确。
    • 在macOS上跳过此步骤,因为该包会自动通过检查默认安装位置来查找SDK。
  2. 安装CLI工具: cargo install playdate-cli
  3. 创建新项目: cargo playdate new hello-world
  4. 运行项目: cd hello-world && cargo playdate run

有关如何使用 playdate-rs 包的更多详细信息,请参阅 github.com/rusty-crank/playdate-rs,以及 API 文档请参阅 docs.rs/playdate-rs

可用命令

cargoplaydate new<PATH>

Create a new cargo playdate package

Usage: cargo-playdate new <PATH>

Arguments:
  <PATH>

Options:
  -h, --help  Print help

cargoplaydate init

Create a new cargo playdate package in an existing directory

Usage: cargo-playdate init [PATH]

Arguments:
  [PATH]  [default: .]

Options:
  -h, --help  Print help

cargoplaydate build

Compile the current package

Usage: cargo-playdate build [OPTIONS]

Options:
      --release              Build the project in release mode, with optimizations
      --all-features         Activate all available features
      --no-default-features  Do not activate the `default` feature
  -F, --features <FEATURES>  Space-separated list of features to activate
  -p, --package <PACKAGE>    Package to process (see `cargo help pkgid`)
      --device               Build for the real device (default is simulator)
  -h, --help                 Print help

cargoplaydate run

Run the local package on the playdate simulator or a device

Usage: cargo-playdate run [OPTIONS]

Options:
      --release              Build the project in release mode, with optimizations
      --all-features         Activate all available features
      --no-default-features  Do not activate the `default` feature
  -F, --features <FEATURES>  Space-separated list of features to activate
  -p, --package <PACKAGE>    Package to process (see `cargo help pkgid`)
      --device               Build for the real device (default is simulator)
  -h, --help                 Print help

依赖

~8–19MB
~251K SLoC