Feature Request: File I/O Exercises in Rustlings
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading the existing Rustlings exercise structure and how its tests and embedded files are handled. Then assess whether a new 24_file_io/ category can support file_io1.rs, file_io2.rs, file_io3.rs and their input/output files. Done means the structure is agreed and the three progressive exercises have tests for the described file operations.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Add a new category (24_file_io/) focused on file operations, a crucial skill for Rust developers currently missing from Rustlings.
Proposed Exercises
-
Basic File Reading (file_io1.rs)
- Teaches using
fs::read_to_stringand handling file not found errors - Includes input file with text content to read
- Tests verifying correct content parsing
- Teaches using
-
Buffered Reading & Writing (file_io2.rs)
- Demonstrates efficient reading with
BufReaderand writing withBufWriter - Processes a large input file line by line
- Writes transformed content to an output file
- Tests verifying correct transformation
- Demonstrates efficient reading with
-
Path Manipulation & Metadata (file_io3.rs)
- Works with
PathandPathBufto handle file paths safely - Extracts and manipulates file metadata (creation time, size, permissions)
- Tests verifying correct metadata extraction
- Works with
Implementation Structure
- Each exercise includes a Rust file and associated input/output files
- Files are embedded and available during testing
- All exercises follow Rustlings patterns with TODO comments and progressive difficulty
Questions
- Is handling extra files (inputs/outputs) compatible with current Rustlings structure?
- Any specific file I/O patterns you'd prefer to prioritize?
I'm happy to draft sample implementations if this proposal is of interest.
cc @mo8it
- Lingua principale
- Rust
- Stelle
- 64.6k
- Fork
- 11.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/rustlings
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
A-exercises C-enhancement P-low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Proposal: German (Deutsch) translation for Community ExercisesForse di nuovo libera @mo8it l’ha presa 62 giorni fa e non c’è nessuna pull request aperta. Aperta
rust-lang/rustlings#2445 · 4 commenti · 2 reazioni · 1 assegnatario ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di rust-lang/rustlings
Issue simili
-
Panic on live viewport resize when unstyled elements exist in display: none subtreeForse già presa @GoCoder7 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DioxusLabs/blitz#1488 ·
I maintainer di solito rispondono entro 1 giorno
-
🏷️ good first issue enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
S-Needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
vectordotdev/vrl#2042 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno