pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 24 forks source link

Document how to update bindings #21

Closed rtsuk closed 1 year ago

tjkirch commented 1 year ago

I'd be up for helping update crankstart to SDK 1.13.0, and I might be able to muddle my way through, but docs would certainly help!

rtsuk commented 1 year ago
  1. Install the bindgen-cli and its dependencies.
  2. Have the PlayDate SDK installed at $HOME/Developer/PlaydateSDK.
  3. Run ./scripts/generate_bindings.sh from the crankstart directory.

As far as I know, this has only every been run on a Mac.

rtsuk commented 1 year ago

I went through these steps to make sure they were the right ones and it worked so I'm going to push the new bindings.

tjkirch commented 1 year ago

Awesome, thanks! I might take a look to see how it works on Linux, too.

rtsuk commented 1 year ago

I set this up kinda wrong. I'm not sure the entire target triple is needed, probably just the processor family. That way AArch64 Linux or Mac could use the same bindings.

tjkirch commented 1 year ago

I tried this today because I wanted to update to SDK 1.13.6, which has a change to the signature of draw_text. A few notes:

In the end, it didn't find any changes from the existing bindings. The C API didn't change, only Lua. I should have checked that first ;(

In terms of actually closing this issue by documenting the process - I guess it could just go at the bottom of the README, unless you'd prefer a new document? I can try it.

rtsuk commented 1 year ago

Bottom of the readme is fine.

I'll have to check it on Mac after you modify it.