# Raw Transmute
[](https://crates.io/crates/raw-transmute)
[](https://docs.rs/raw-transmute)
[](https://unlicense.org/)
[](https://codeberg.org/Aseminaunz/raw-transmute)
[](https://docs.rs/raw-transmute)
Rust's own built-in `transmute` is, ironically, quite limited.
It does not support generically-sized types, nor types with different sizes.
This crate provides a more permissive alternative through the use of unions:
- `raw_transmute` to unsafely transmute between any two types, regardless of size or
genericity.
- `raw_transmute_uninit` to safely transmute into a `MaybeUninit` of the destination type.
The MSRV for this crate is Rust 1.31. However, some features require later versions:
- Transmuting into `MaybeUninit` requires Rust 1.36 or later.
- Transmuting for non-`Copy` types requires Rust 1.49 or later.
- `const` support for both functions requires Rust 1.56 or later.