This is only avaiable for C and python. Is there something equivilant for Rust?
Would this also be compatible for Odroid and other open boards?
My answer was a little quick, I just thought of the Raspberry. I haven’t tested it, but I don’t think so.
But it use embedded-hal which is an Hardware Abstraction Layer (HAL)
Oh ok thanks,
I got another question, say if I was programming a laser sensor for the Raspberry Pi using Rust, if I were run the exact same code for the Odroid or other open board like computers, then would the code run properly for the laser (other than ajusting the GPIO pins)?
This is exactly the idea of
embedded-hal (which @kurdy) mentions. HALs for specific SoCs tend to be based on the abstractions in this crate, such as
OutputPin for GPIOs. Code that is written using these abstractions, and separated from setup code for the specific SoC, can be used with any supported board.
See, for example, platform-agnostic device drivers like the SSD1306 one: https://github.com/jamwaffles/ssd1306
Is it Beta software?
In a sense. Although level of completeness differs enormously per board (rPi, STM are most popular so sees the most effort) and a lot of it is usable, none of the crates in the embedded rust ecosystem (https://github.com/rust-embedded/awesome-embedded-rust gives a good overview) have reached 1.x yet, which means the APIs have not been fully stabilized. This might take a long time.