Skip to content

Feature(*): Introduce fully async library#58

Open
MathiasKoch wants to merge 60 commits intomasterfrom
feature/async
Open

Feature(*): Introduce fully async library#58
MathiasKoch wants to merge 60 commits intomasterfrom
feature/async

Conversation

@MathiasKoch
Copy link
Member

@MathiasKoch MathiasKoch commented May 31, 2024

Missing stuff:

  • (OTA): Request momentum
  • (OTA): HTTP data interface
  • (OTA): README
  • (Provision): Re-subscribe on None in subscriptions
  • (Shadows): integration test
  • (Shadows): Documentation overhaul
  • (Shadows): README
  • CI (Tests & clippy)

Fixes #33

@MathiasKoch MathiasKoch changed the title Feature(*) Introduce fully async library Feature(*): Introduce fully async library May 31, 2024
MathiasKoch and others added 14 commits June 11, 2024 10:13
…o individual accepted and rejected topic for now
* Wip on rewriting shadows to async

* Further work on async shadows. Still working on compile errors

* Fix: Async shadow (#60)

* fix asyunc shadow

* renaming of handle message and some linting

* shadows error fix and handle delta should wait for connected

* fmt

* Add const generic SUBS to shadows

* Fix/async shadow (#61)

* fix asyunc shadow

* renaming of handle message and some linting

* shadows error fix and handle delta should wait for connected

* fmt

* subscribe to get shadow and do not overwrite desired state

* Get shadow should deserialize patchState

* wait for accepted and rejected for delete and update as well

* Make sure OTA job documents can be deserialized with no codesigning properties in the document (#62)

* Dont blindly copy serde attrs in ShadowPatch derive, but rather introduce patch attr that specifies attrs to copy

* Add skip_serializing_if none to all patchstate fields

* Shadows: Check client token on all request/response pairs

* Create initial shadow state, if dao read fails during getShadow operation

* remove some client token checks

* Fix not holding delta message across report call

* handle delta on get shadow

* Bump embedded-mqtt

* Fix all tests

* Allow reporting non-persisted shadows directly, through a report fn

* Bump embedded-mqtt

* Enhancement(async): Mutex shadow to borrow as immutable (#63)

* Use mutex to borrow shadow as immutable

* remove .git in embedded-mqtt dependency

---------

Co-authored-by: Kenneth Knudsen <ksk@blackbird.online>
Co-authored-by: Kenneth Knudsen <98805797+KennethKnudsen97@users.noreply.github.com>
* Ensure only one sub on the same topic

* wait for mqtt connected in report

* Reduce request locks to one
KennethKnudsen97 and others added 8 commits February 24, 2025 15:33
@t-moe
Copy link

t-moe commented Jul 8, 2025

Whats the status of this PR and this project in general? I'm evaluating using rustot for my next IOT project.

The main branch currently does not build unless using --locked (failed to download base64ct v1.8.0 [...] requires edition2024 when running cargo test).
And this branch here depends on the private embedded_mqtt.... I assume you plan to publish embedded_mqtt?

Thank you :)

@MathiasKoch
Copy link
Member Author

Hi @t-moe
Status is currently that this "draft" PR has become our new production :p
You are correct that it depends on a currently closed-source embedded_mqtt crate, we have on our todo to give it the final shine before doing a public reveal and release of that one.
We were not aware of anyone actually using this :) We might be able to prioritize the release of embedded-mqtt & rustot internally. We are still looking for a new for embedded-mqtt though, as embedded-mqtt is currently taken on crates.io :(

@t-moe
Copy link

t-moe commented Jul 9, 2025

Got it, thank you!

I'm not actively using this yet. However, in a previous project, I implemented AWS Shadow, Streams, and Jobs myself - before I was aware of rustot. For my next project, I thought it would be great to avoid duplicating effort and build on rustot instead.

A couple of blockers for me:

  • It uses const generic expressions and requires nightly. (I assume this will remain the case as long as the crate targets no_alloc?)
  • It depends on a specific MQTT implementation (mqttrust // embedded_mqtt), or at least requires pulling in the full crate to implement the necessary traits. Personally, I would prefer if rustot defined its own simple MQTT trait (in absence of a standardized MQTT trait).

I think, I will reuse my own implementation for now, and come back later, when another project arrives.

@MathiasKoch
Copy link
Member Author

Roger.

It uses const generic expressions and requires nightly. (I assume this will remain the case as long as the crate targets no_alloc?)

This is true, and we might be able to address it if its an actual blocker, but for us it makes things a bit easier and we are running nightly anyway.

It depends on a specific MQTT implementation (mqttrust // embedded_mqtt), or at least requires pulling in the full crate to implement the necessary traits. Personally, I would prefer if rustot defined its own simple MQTT trait (in absence of a standardized MQTT trait).

I have attempted to make an abstraction for the MQTT client, but i have failed all of my attempts, due to complex lifetimes in the subscription streams.

KennethKnudsen97 and others added 9 commits September 16, 2025 12:51
- Bump heapless from 0.8 to 0.9
- Update embedded-mqtt from git ref to version 0.1.0
- Update defmt feature: use heapless/defmt instead of heapless/defmt-03

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@t-moe
Copy link

t-moe commented Jan 19, 2026

Hi @MathiasKoch ,
As followup to my comment above: Can you give me access to the embedded_mqtt repo 😬 ?
I would like to take a look, and think about how we could join forces on these AWS IoT Topics. Currently I'm still using my own (private/hacky) implementation of it in production, but I would really love to see and contribute to a a public AWS IoT implementation for embedded rust. Ideally, that would build up on existing ideas, instead of creating a 2nd crate/implementation from scratch...

@MathiasKoch MathiasKoch marked this pull request as ready for review February 17, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for AWS IoT Device Defender

3 participants

Comments