zlacker

[parent] [thread] 3 comments
1. the__a+(OP)[view] [source] 2024-01-19 23:23:07
I run into this sometimes for `std` rust libraries; generally involving networking. Not directly mentioned in the article, but I prefer to wrap a `block_on` in a thread, and use `std::sync::mpsc`, or as required, to manage state.

On embedded, I make my own libraries for everything; the open-source community has gone full-in on either Async, or an typestate/generic API. I don't see this changing any time soon, but maybe later down the road. I feel like the only one who doesn't like either.

replies(2): >>bpye+x >>MrBudd+IK
2. bpye+x[view] [source] 2024-01-19 23:26:39
>>the__a+(OP)
Do you have any open source embedded projects? I’m curious of the direction you’ve gone in.
replies(1): >>the__a+H
◧◩
3. the__a+H[view] [source] [discussion] 2024-01-19 23:27:31
>>bpye+x
Here's one: https://github.com/David-OConnor/stm32-hal

Device IC code generally ends as files in my firmware directly.

4. MrBudd+IK[view] [source] 2024-01-20 08:25:42
>>the__a+(OP)
Nah same, I find the typestate pattern to be overprotective against bugs that usually get caught during development, and async Rust is just a killjoy overall.
[go to top]