t-moe[m] has quit [Quit: Idle timeout reached: 172800s]
RobertJrdens[m] has joined #rust-embedded
<RobertJrdens[m]>
How do y'all use write!()/writeln!() against an embedded_io_async::Write? Anybody have a little wrapper ready that impls fmt::Write into a buffer and then async drains the buffer into the async::Write? Preferrably with an awrite!(async_write, stuff).await macro?
<JamesMunns[m]>
The downside of the formatting machinery is that you can't really do it incrementally
<JamesMunns[m]>
so you do usually need to format the whole thing into a buffer and then send it
<RobertJrdens[m]>
I want to buffer
<RobertJrdens[m]>
I think I said that.
<JamesMunns[m]>
Yep! I wasn't sure what your awrite! macro would do
<JamesMunns[m]>
(I would love to be able to incrementally format into a fixed size buffer, e.g. a 128 byte buffer, where even if the formatted string was a total of 512 bytes, you could alternate formatting and async sending; but you can't do this)
<JamesMunns[m]>
but yeah, usually I writeln to a buffer, then do a normal async send(buf).await, I don't usually even macro it, but you could
<thejpster[m]>
I don't think I've ever built test binaries and then not just executed them immediately.
juliand[m] has quit [Quit: Idle timeout reached: 172800s]
<vollbrecht[m]>
<thejpster[m]> "I don't think I've ever built..." <- he wants to "immediately" execute them but they cant be run on the host machine, so he try's to get them and forward them.
<thejpster[m]>
oh. Ferrocene does that, building aarch64 test binaries on Linux and then sending them over to an Aarch64 machine to execute. Pretty sure upstream Rust does it to.
<thejpster[m]>
But I don't know how they do it. Probably not using `cargo test`