Skip to content

Helpful resources for arrays

Arrays: the map › Beside the lessons · start at: Writing an array down

Level: reference · the reading list

One line: Where else fixed-size arrays are explained — The Book, the Reference, std, the Edition Guide, Rust by Example, Comprehensive Rust, Rustlings, two books by chapter and section name, articles and videos — with what each covers and what to read with care, because several say things that 1.98.0 no longer does.

Every entry was checked on 2026-09-16: each URL answered 200 (Stack Overflow and O'Reilly refuse scripted requests, so those two were checked through the Stack Exchange API and a copy of the book), and each anchor exists on its page. Print books give their chapter and section titles, because numbers move between editions. "Read with care" names a sentence that fails when run, and the claims page has the run.

If you read only four

Official documentation

Tutorials and exercises

Books

  • Rust in Action (Tim McNamara, Manning 2021), ch. 2 "Language foundations" → §2.10 "Making lists of things with arrays, slices, and vectors" → 2.10.1 "Arrays", 2.10.2 "Slices", 2.10.3 "Vectors". Listing 2.21, ch2-3arrays.rs ↗, is where Writing an array down starts. Read with care: slices give "fast, read-only access", but &mut [T] writes; and the remark that implementing traits for arrays becomes unwieldy predates const generics.
  • Programming Rust, 2nd ed. (Blandy, Orendorff & Tindall, O'Reilly 2021), ch. 3 "Fundamental Types" → "Arrays, Vectors, and Slices" → "Arrays", "Vectors", "Slices". The three types side by side, including that a length known only at run time cannot size an array. Read with care: the useful methods "are all provided as methods on slices, not arrays" is now mostly rather than entirely true.

Articles and answers

Videos

The titles were checked through YouTube's oEmbed endpoint and the timestamps come from the video descriptions; the videos were not watched for this list.

Checked and left out

In this library

Question Page
how to write one Writing an array down
the length in the type, slices, &[T] parameters Arrays and slices
array or Vec Array or Vec?
passing and returning Arrays in and out of functions
stack, heap, Box<[T]> Where an array lives
tables in a static An array in a const or a static
iterating iter, iter_mut and into_iter

See also

Po polsku

Lista źródeł o tablicach [T; N], sprawdzona 2026-09-16: The Book (rozdział 3.2, „The Array Type”), Reference (typy tablicowe, wyrażenia tablicowe i reguła dla [wartość; N]), strona array w std, Edition Guide o IntoIterator dla tablic, Rust by Example, Comprehensive Rust, Rustlings, Rust in Action (§2.10) i Programming Rust (rozdział 3), artykuły i nagrania. Książki podano z tytułami rozdziałów i sekcji, bo numery zmieniają się między wydaniami.

„Czytaj ostrożnie” oznacza zdanie, które nie wytrzymuje uruchomienia na 1.98.0. Najczęściej chodzi o „tablice są na stosie”, o błąd kompilacji przy indeksie poza zakresem (tylko dla stałych) i o odpowiedzi sprzed edycji 2021, w których into_iter() na tablicy zwracało referencje.

Szukaj po polsku: tablice w Ruscie książki · rust arrays tutorial · rust array into_iter edition 2021 · compound types