Open thunderstorm010 opened 4 days ago
Hi @thunderstorm010, that would be nice to have in the message generation, to generate messages that can be used in embedded applications.
I've created a very, very small subset of this library at https://github.com/thunderstorm010/ping-protocol-core.git. It only includes decoding and serializing functions. Open for everything.
Hey @thunderstorm010, to make it broadly available as no-std, we need to think about how to replace the tokio ecosystem features. I did a quick attempt by splitting out decoder.rs and message.rs into an inner core project (https://github.com/RaulTromber/ping-rs/tree/split_no_std_method). Then in /ping-protocol-core: cross build --target thumbv7em-none-eabihf --example stm32 --features stm32 With this approach, the examples still run on the main crate, but we need to put more effort into checking everything. It would be nice to forward the message generation from builder to this inner crate.
Your code looks quite cool tbh, but as with upstream the code in decoder.rs involves a lot of unnecessary cloning (which I mostly removed in my version). I think I can contribute some of this code (without smallvec stuff) to upstream.
And, we should probably feature gate alloc.
Hi @thunderstorm010, that would be cool, be free to send a PR
I'd like to use this library on some STM32 chips.