@@ -48,35 +48,6 @@ working with C strings. Rust 1.64 also provides
48
48
for working with owned C strings using only the ` alloc ` crate, rather than the
49
49
full ` std ` library.
50
50
51
- ### New internal layout for network structures
52
-
53
- The standard library network data structures
54
- [ ` Ipv4Addr ` ] ( https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html ) ,
55
- [ ` Ipv6Addr ` ] ( https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html ) ,
56
- [ ` SocketAddrV4 ` ] ( https://doc.rust-lang.org/std/net/struct.SocketAddrV4.html ) ,
57
- and
58
- [ ` SocketAddrV6 ` ] ( https://doc.rust-lang.org/std/net/struct.SocketAddrV6.html )
59
- now use a more compact, memory-efficient layout, rather than using the memory
60
- layout of the underlying OS data structure.
61
-
62
- Normally, such a change would be an entirely internal detail of the standard
63
- library, with the only user-visible effect being less memory usage. However,
64
- some crates relied on the internal implementation details of the standard
65
- library, by using
66
- [ ` std::mem::transmute ` ] ( https://doc.rust-lang.org/std/mem/fn.transmute.html ) or
67
- similar to access the internal representation and pass it directly to OS
68
- functions.
69
-
70
- Such internal implementation details of the standard library are * never*
71
- considered a stable interface. Nonetheless, because multiple crates relied on
72
- this, we first worked with the authors of all of the still-maintained crates
73
- doing so to arrange for the release of new versions, and to yank the old ones,
74
- before making this change. New releases for known affected crates have been out
75
- for typically over a year, and the vast majority of impacted users should be
76
- able to mitigate with a ` cargo update ` if needed."
77
-
78
- See < https://github.com/rust-lang/rust/pull/78802 > for more details.
79
-
80
51
### Enhancing ` .await ` with ` IntoFuture `
81
52
82
53
Rust 1.64 stabilizes the
@@ -186,14 +157,6 @@ In the future, we hope to provide simpler APIs that require less use of
186
157
low-level details like ` Poll ` and ` Pin ` , but in the meantime, these helpers
187
158
make it easier to write such code.
188
159
189
- ### Minimum required kernel and glibc versions increased
190
-
191
- As [ previously
192
- announced] ( https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html ) ,
193
- ` linux ` targets now require at least Linux kernel 3.2 (except for targets which
194
- already required a newer kernel), and ` linux-gnu ` targets now require glibc
195
- 2.17 (except for targets which already required a newer glibc).
196
-
197
160
### ` rust-analyzer ` now available via ` rustup ` , no longer in preview
198
161
199
162
Users of ` rust-analyzer ` can now obtain it via ` rustup ` on the stable and beta
@@ -209,6 +172,27 @@ These APIs are now usable in const contexts:
209
172
210
173
- ...
211
174
175
+ ### Compatibility notes
176
+
177
+ Rust 1.64 includes some changes that might prevent you from upgrading:
178
+
179
+ * As [ previously
180
+ announced] ( https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html ) ,
181
+ ` linux ` targets now require at least Linux kernel 3.2 (except for targets which
182
+ already required a newer kernel), and ` linux-gnu ` targets now require glibc
183
+ 2.17 (except for targets which already required a newer glibc).
184
+
185
+ * Rust 1.64.0 changes the memory layout of ` Ipv4Addr ` , ` Ipv6Addr ` ,
186
+ ` SocketAddrV4 ` and ` SocketAddrV6 ` to be more compact and memory efficient.
187
+ This internal representation was never exposed, but some crates relied on
188
+ it anyway by using ` std::mem::transmute ` , resulting in invalid memory
189
+ accesses. Such internal implementation details of the standard library are
190
+ * never* considered a stable interface. To limit the damage, we worked with
191
+ the authors of all of the still-maintained crates doing so to release fixed
192
+ versions, which have been out for more than a year. The vast majority of
193
+ impacted users should be able to mitigate with a ` cargo update ` .
194
+
195
+
212
196
### Other changes
213
197
214
198
There are other changes in the Rust 1.64 release, including:
0 commit comments