-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relationship to the Transmute pre-rfc #4
Comments
Thoughts as I read:
|
We're not really using transmute anywhere that I can remember, nor expose a safe way of doing so in our API. So I'm not really sure I can think of a place where we could use such a mechanism here? The point of the interprocess traits as currently defined here is to guarantee things assuming the references are to the same types on both sides of the process boundary, and that processes are cooperative; meaning that no transmute should be happening, no padding should be exposed, etc. |
There must be somewhere a transmute is happening, even if it's hidden in |
And yes, all transmutable types of the same size are isomorphic. |
Well, in inteprocess-traits, we do assume that processes are cooperative, and that the unsafe requirements are satisfied on both sides. With the unsafe requirements being satisfied, it is impossible to retrieve references to the same memory region as two distinct types. In other words, checking the absence of transmute is pushed to the user as a requirement to verify. Also, because that is the API of Is that more clear? |
I read this and thought of you... https://internals.rust-lang.org/t/pre-rfc-safe-transmute/11347
The text was updated successfully, but these errors were encountered: