Playdate Bindings Generator
Util to generate bindings to Playdate with additional code-gen features like in-code documentation directly by official c-reference.
Requirements
- Rust nightly toolchain
- Playdate SDK
- Ensure that env var
PLAYDATE_SDK_PATH
points to the SDK root
- Ensure that env var
- Follow the official documentation
- Ensure that
arm-none-eabi-gcc
orgcc-arm-none-eabi
in yourPATH
- Ensure that
- Requirements inherited by bindgen, follow official documentation.
Configuration
Inherited configuration by bindgen: follow bindgen official documentation.
Env var PLAYDATE_SDK_PATH
as described in playdate official documentation.
Optional env var ARM_GCC_PATH
to help to find arm-none-eabi-gcc
(or gcc-arm-none-eabi
) with entire toolchain. Useful only for troubleshooting.
Usage
Cargo.toml:
[]
= "playdate-bindgen"
= "*"
Add this to build-dependencies
and add to your build-script something like this:
let cfg = default;
let generator = new.expect;
let out_path = env_var.map
.map
.unwrap;
let bindings = generator.generate.expect;
bindings.write_to_file.expect;
For complex examples see build-script in the playdate-sys crate.
This software is not sponsored or supported by Panic.