1. 14
    1. 4

      I’ve been cranky about async Rust in the past, but have really, really enjoyed writing embedded Rust with the Embassy async framework in the past year.

      At some point I stopped to ask the question there - wait, what happens if this timeout triggers, what state will the network stack be in? - and got sent down the cancel safety rabbit hole.

      It gives me the same sense of discomfort as I had when first learning to write concurrent code, there’s just no end to the ways you can mess it up and edge cases will trigger super rarely..

      It kind of feels like it’s reintroducing a variant of the issue with exceptions, hidden flows - you have to keep in your head that the function may return or it may stop forever at any await

      Anyway, just rambling; really liked this post and that someone’s trying to make APIs that really think about this

      1. 1

        Have you tried using RTIC? I’m only familiar with pre 2.0 asyncless variant of it but guarantees it provides are really neat.

        1. 1

          Ooh, no, but it looks very nice, I will def. check that out. Thank you for the tip!