Hello Particle community,
I'm here to present some of the recent work I've been doing to add Rust support to the photon.
(Full disclaimer: I'm under contract to improve Rust's embedded development story and one of the tasks involves adding Rust support to well known development boards and I picked the photon. Yay!)
My focus is making sure that the tooling and development experience for this board is as good as possible on the three major OSes. To that goal I have created a template Cargo project to get you writing code for your photon as quickly as possible. Give it a try! I have successfully tested it on Linux and on Windows and expect that it should also work well on macOS.
I have also been creating a safe API on top of the Firmware API, and already have working part of the Cloud API, the USB Serial API, the delay API and the digital output API. Furthermore, I have created memory safe abstractions for sharing data between the application thread and the cloud functions so all the examples in the project template are written in 100% safe Rust!
Do let me know if anything doesn't work for you by opening an issue in this issue tracker. Also let me know if I should prioritize work on some particular API that's currently missing. And, by the way, you can help me with that: Adding more low level bindings is easy as adding the function signature to this block as explained here; building safe APIs on top of that require some discussion about the invariants we want to preserve and how we want to do error handling so chime in the discussion.
cc @dbrgn @zach