embedded-hal icon indicating copy to clipboard operation
embedded-hal copied to clipboard

Add BufReader impl

Open DaneSlattery opened this issue 1 year ago • 4 comments

std::io implements a useful std::io::BufReader.

This is my attempt at implementing for embedded-io.

DaneSlattery avatar Aug 30 '24 09:08 DaneSlattery

This idea spawned from https://github.com/esp-rs/esp-idf-svc/pull/469

DaneSlattery avatar Aug 30 '24 09:08 DaneSlattery

I think this already exists with https://github.com/rmja/buffered-io?

Whether to add it directly to embedded-io is of course another question.

MathiasKoch avatar Aug 30 '24 10:08 MathiasKoch

I think this already exists with https://github.com/rmja/buffered-io?

I see that buffered-io only supports embedded-io-async, perhaps I can retarget this PR towards that crate for the non-async feature?

If so where should it go, a new utility crate?

Perhaps into /embedded-io-adapters?

This is probably something that needs to be discussed in the WG meeting

Let me know what comes of that WG meeting. Happy to make some changes, and perhaps to also replicate some of the ideas from buffered-io, such as passing in the buffer rather than allocating.

DaneSlattery avatar Aug 30 '24 14:08 DaneSlattery

Interested in this, what would be required to bring it over the finish line?

greged93 avatar Mar 20 '25 10:03 greged93