Rust 1.18 arrived on June 8, 2017, with a mix of developer-facing improvements. One notable milestone was not a compiler feature: the release included the first draft of the second edition of The Rust Programming Language in the online documentation. Nineteen of its 20 chapters had drafts, and the team said the rewrite drew on two years of teaching experience. Written openly with more than 100 contributors, the book was being shared early so a wider audience could use it and offer feedback. [story-s1]
The release also made visibility more precise. A declaration such as `pub(crate)` could be exposed throughout its crate without becoming public to downstream users; a path restriction could narrow access further. For Windows applications, a new subsystem attribute let developers select console or windows behavior. Rust also began reordering fields in ordinary structs, tuples, and enum variants to reduce padding where possible. The announcement illustrated a sample x86_64 struct shrinking from six bytes to four, while cautioning that layout remained unspecified; FFI structures could use `#[repr(C)]` to preserve C-compatible layout. [story-s1]
Source documents
- Announcing Rust 1.18 | Rust Bloghttps://blog.rust-lang.org/2017/06/08/Rust-1.18/
