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.
First of all, thank you for all the effort you put into this crate! It is wonderful to have an option of writing performance-sensitive games for PlayDate in Rust.
I have a question regarding memory allocations. If my understanding is correct, certain PlayDate SDK functions can allocate memory. My guess would be that either standard C allocator is used or some other allocator coming from the SDK.
What allocator is used for the Rust part of the game? Basically, what exactly happens when one writes Box::new in the game's code?
From what I gather, the options are:
The same allocator as PlayDate SDK. There is a global allocator defined somewhere in crankstart, which calls respective malloc/free functions from C
There is a Rust allocator, which has its own separate heap. In this case, the question is how C allocator and Rust allocator share the RAM
Maybe something else I missed!
Would appreciate any pointers/hints to the answer. Thanks!
Hi!
First of all, thank you for all the effort you put into this crate! It is wonderful to have an option of writing performance-sensitive games for PlayDate in Rust.
I have a question regarding memory allocations. If my understanding is correct, certain PlayDate SDK functions can allocate memory. My guess would be that either standard C allocator is used or some other allocator coming from the SDK.
What allocator is used for the Rust part of the game? Basically, what exactly happens when one writes
Box::new
in the game's code?From what I gather, the options are:
Would appreciate any pointers/hints to the answer. Thanks!