@@ -107,6 +107,30 @@ memory model, and *any future memory model*. We ensure this by:
107
107
[ Miri ] : https://github.com/rust-lang/miri
108
108
[ Kani ] : https://github.com/model-checking/kani
109
109
110
+ ## Relationship to Project Safe Transmute
111
+
112
+ [ Project Safe Transmute] is an official initiative of the Rust Project to
113
+ develop language-level support for safer transmutation. The Project consults
114
+ with crates like zerocopy to identify aspects of safer transmutation that
115
+ would benefit from compiler support, and has developed an [ experimental,
116
+ compiler-supported analysis] [ mcp-transmutability ] of when a value of one
117
+ type is soundly transmutable into another. Once this functionality is
118
+ sufficiently mature, zerocopy intends to replace its internal
119
+ transmutability analysis with the compiler-supported one. This change will
120
+ likely be solely an implementation detail that is invisible to zerocopy's
121
+ users.
122
+
123
+ However, Project Safe Transmute will not replace the need for most of
124
+ zerocopy's higher-level abstractions over transmutability. The experimental
125
+ compiler analysis is a tool for checking the soundness of ` unsafe ` code—not
126
+ a tool to avoid writing ` unsafe ` code altogether. For the foreseeable
127
+ future, crates like zerocopy will still be required in order to provide
128
+ higher-level abstractions on top of the building block provided by Project
129
+ Safe Transmute.
130
+
131
+ [ Project Safe Transmute ] : https://rust-lang.github.io/rfcs/2835-project-safe-transmute.html
132
+ [ mcp-transmutability ] : https://github.com/rust-lang/compiler-team/issues/411
133
+
110
134
## Disclaimer
111
135
112
136
Disclaimer: Zerocopy is not an officially supported Google product.
0 commit comments