playdate-bindgen-cfg

Crates.ioplaydate-bindgen-cfg
lib.rsplaydate-bindgen-cfg
version0.1.7
sourcesrc
created_at2023-10-05 15:21:38.875694
updated_at2024-06-05 07:59:54.693122
descriptionMinimal configuration for playdate-bindgen.
homepagehttps://github.com/boozook/playdate
repositoryhttps://github.com/boozook/playdate.git
max_upload_size
id994225
size16,104
Alexander Koz. (boozook)

documentation

README

Configuration for Playdate Bindings Generator

Lightweight util for build-scripts to configure and execute playdate-bindgen used to generate bindings to Playdate with extras.

Usage

Cargo.toml:

[build-dependencies.bindgen]
package = "playdate-bindgen-cfg"
version = "*"

Add this to build-dependencies and add to your build-script something like this:

let mut cfg = bindgen::Cfg::default();
cfg.output = Some("some/output/path.rs");

let pdbindgen_found = bindgen::Runner::find_tool(&cfg);    // find existing pdbindgen (path, version)
let sdk_version = bindgen::Runner::find_sdk_version(&cfg); // execute pdbindgen to find SDK properly
let result = bindgen::Runner::gen_cmd(&cfg);               // execute pdbindgen to generate bindings

For complex examples see build-script in the playdate-sys crate.


This software is not sponsored or supported by Panic.

Commit count: 476

cargo fmt