Rust Development Thread

Have you tried it on real hardware? I'm willing to try if you are unable.

It works on hardware for prior versions. My device is currently 1.12.3 with no update available. I suspect it will just work on hardware, but feel free to give it a shot and report back if you feeling motivated!

Tested and working on hardware with Playdate SDK 1.13.1.

1 Like

It looks like you have already figured out an effective solution for developing games for the Playdate using the Rust language. Have you tried the other examples in the C_API folder? If so, do you have any tips or advice on how to get them up and running? Additionally, I recommend checking out the official Playdate SDK Documentation for more information and resources related to MLSDev - software development company

I wrote a "Getting Started with Playdate" blog post that covers the following. Last time I checked, the information can be used to run all of the C and Lua examples.

  • Pulp. Running downloaded PDX files in the simulator.
  • Lua. Running project-based Lua examples.
  • Lua. Running single-file Lua examples.
  • C API. Running examples.
  • Links to documentation.

Although none of the information is specifically related to Rust, it is useful in practice. crankstart provides Rust bindings to the C API, so it is important to be familiar with the C API when developing in Rust. Furthermore, last time I checked, the C API documentation was written with the assumption the reader is familiar with the Lua documentation. Understanding development with Pulp is not important when working in Rust.

I have also written related articles on getting started with Playdate development in Rust, Fortran, and ASM. The Rust post summarizes this thread, but it is written in a tutorial format. There is also a post on "Using cc-rs to Mix Rust with C, C++, and ASM", if you want to do mixed language development.

1 Like

@sgeos Great posts!
In near future, I hope, will see updated tooling for development in Rust, and so you probably update thus part about complexity. It because all goes to outer simplicity. I working on it. Look at videos in attached post.

1 Like

Thanks for doing the OS/Sim v2.0 update work Alex! I've been following along on forum threads and GitHub. Am I right in thinking that it's probably best to wait for the next SDK release before trying to get started with Rust on Playdate?

1 Like

Rust tooling was broken when I last tried to build for the latest SDK. My guess is that this is still true?

Current state as I know:
Crank is fixed and supports 2.0.1 SDK and works.
I still not regenerate new bindings but there was pr with some fixes as I remember. Will look at it tomorrow.
Currently Iā€™m working almost fulltime on the alternative build system and ā€œstdā€, kind of. probably it can become next version of crank. It canā€™t replace crankstart because of really different api there.
As I hope Iā€™ll open it in a week or two, :man_shrugging:t2:
Also weā€™re thinking about some interesting good changes in the ā€œpd-rsā€ github-orgā€¦

@sgeos do you mean crank or crankstart or both of them?
This pr fixes compatibility issues for crank.

@briandorsey depends on expected level of comfort and spending time youā€™re ready for. Crank works, so why not?..

Also about ā€œprobably next crankā€:
Iā€™m a little bit exhausted and need help with it, as I suppose. So I can give private access to the repo if someone want it. But state is not ideal yet. But it works as you can see on previously mentioned screencasts.

A was getting a CAPI-related crash when testing on hardware. The simulator has always just worked.

Thatā€™s probably the reason to try my private side-project :wink:

Anyway Iā€™ll try to fix crank again.

Could you try again with current state? Latest crank should work, crankstart just updated and also should work too.

Thanks for the encouragement! I was able to build and run all three crankstart examples both in Sim and on device.

3 Likes