I am building an MQTT-based Rust application that sends a message to the IoTHub so that this is forwarded to a target device which listens to cloud-to-device messages.
The target device "myDev" is subscribed to the topic devices/myDev/messages/devicebound/#
and it can receive messages from the IoTHub interface ("Message to Device", on the Azure Portal).
The examples I have found to achieve this in other programming languages use the Azure IoT SDK, which has a client service. See for instance the example for Java: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-java-java-c2d#send-a-cloud-to-device-message
The problem is that there is really no official Azure IoT SDK for Rust. I could only find this project https://github.com/damienpontifex/azure-iot-sdk-rs which I cannot use because it has a dependency with Tokio > 1.x and I have to stick for now with Tokio 0.x.
However, I can imagine that sending a cloud-to-device message to IoTHub must be somehow doable. Required Information is probably: device_id, body and the properties, which are the fields available in the interface.
But I haven't found further details anywhere. Any help is appreciated.