Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Consider Replacing/Augmenting `embedded-io(-*)` with `alloc::io` and `futures-io`

Aperta
#747 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
embedded-iot

Direzione di ricerca

Start by reviewing the proposed alloc::io and core::io implementations and the existing embedded-io, embedded-io-adapters, and embedded-io-async crates. Compare the proposal's MSRV, alloc, error-type, blocking, and async implications with the linked futures-io work. Done means establishing a maintainer-backed direction for replacement, augmentation, or continued use; no implementation files or tests are named.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Background

With rust-lang/rust#154046 implemented, nightly now has a full implementation of std::io available from alloc::io, and a partial implementation available from core::io. With that, other crates such as futures-io can gain no_std support, potentially making them viable in the embedded space.

Proposal

  • Increase MSRV to whatever version contains a stabilized alloc::io & core::io.
  • Directly use core::io and (where required) alloc::io for synchronous I/O.
  • Use futures-io for asynchronous I/O.
  • Deprecate embedded-io, embedded-io-adapters, and embedded-io-async.

Drawbacks

  • Read and BufRead are currently only available from alloc::io. embedded-io provides alternatives to those traits even without the alloc feature enabled, so using the standard library I/O traits would increase the need for downstream crates to enable the alloc feature.
  • embedded-io allows changing the error type used for I/O operations, whereas the standard library traits use core::io::Error exclusively.
  • embedded-io guarantees its trait implementations are blocking, deferring non-blocking support to ReadReady and WriteReady. These traits could remain, or embedded-hal could move towards the standard library approach of mixed non-/blocking.

Benefits

  • Three fewer crates to maintain.
  • Standardised I/O interface which would allow non-embedded crates to more easily be used in an embedded context (e.g., flate2)
  • Potentially reduced friction for users starting in embedded Rust by avoiding divergence (as noted in #694, #686, and #648)

Notes

  • I'm one of the contributors working on alloc_io and core_io. I'm opening this issue to gauge interest in a standard library implementation of no_std I/O, and whether it may be suitable for stabilization.
Lingua principale
Rust
Stelle
2.7k
Fork
283
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-embedded/embedded-hal

Tutte le issue di rust-embedded/embedded-hal

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.