A rust driver for the notecard?


has there been any attempt at writing an API for Rust that works with embedded-hal I2C? I am currently working on my own driver.

Regards, Gaute

1 Like

Hi @gauteh thanks for posting, and welcome to the community, we’re glad you’re here! We’ve not tried our hands at a Rust API yet, but would love to see one! Please let us know how it goes, and share your progress here as I’m sure there are others in the community that would be interested in a Rust SDK.

Hi, here is the repository for the driver. Currently working on the I2C interface.


I am de-serializing the JSON from card.time, and as specified I get an error before the notecard has available data. I am wondering where the schema for errors and the incomplete structs are (e.g. what are optional fields?).

So far this driver does not use any allocations.

I’ve just published v0.1.0 of the rust driver to crates.io: https://crates.io/crates/blues-notecard, typed requests and responses, no dynamic allocations (everything known upfront and on the stack), generic (and reconfigurable) buffer sizes, a wait / async-ish type API (you can do stuff while waiting for the response.

Set up with defmt ( deferred formatting ), so you don’t compile a bunch of formatting code, just the data when debugging the program.

It also contains a raw, untyped API, so you can deal with dynamic JSON objects if you want.

– gaute