-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no_std support for ReadCache #652
Comments
Oh it's also worth noting that in no_std environment I had to explicitly bring in the |
Does #653 meet your needs?
It already does. However, it also needs the |
This is wonderful. I've just tested with your branch and confirm it works exactly as I'd hoped. Thank you! |
Hello! I'm using this wonderful crate in a no_std environment. In my particular case, I'm parsing UKI (PEs) files on an ESP (vfat) partition using the
fatfs
crate.fatfs
mainline branch works in no_std by simply defining their own variants ofstd::io::Read/Seek
traits: https://github.com/rafalh/rust-fatfs/blob/master/src/io.rs ... It's worth noting that the current latest published release depends on the now-defunct core_io crate.As it happens, I was able to get this working satisfactorily by simply duplicating the entirety of
ReadCache
+ReadCacheRange
, and updating theRead
+Seek
trait references fromstd::io
tofatfs
. The trait signatures are otherwise identical, so everything "just worked" without me needing to wrap my head around how I might implement such a thing myself.Which got me to thinking ... could the
object
crate do something similar? That is, exportobject::io::Read
+object::io::Seek
traits with some ergonomics to easily coercestd::io
variants (not sure how to do that off the top of my head, my Rust-fu is weak).The text was updated successfully, but these errors were encountered: