# platform-cast [![Latest Version]][crates.io] [![API Docs]][docs.rs]
[Latest Version]: https://img.shields.io/crates/v/platform-cast.svg
[crates.io]: https://crates.io/crates/platform-cast
[API Docs]: https://img.shields.io/docsrs/platform-cast.svg
[docs.rs]: https://docs.rs/platform-cast
Platform-specific safe cast.
| | `From` | `TryFrom` | `as` cast | `CastFrom` |
| ------------------------- | -------- | ----------- | --------- | ---------- |
| No runtime check | ✅ | ❌ | ✅ | ✅ |
| `usize` <-> `u64`[^a] | ❌ | ✅ | ✅ | ✅ |
| No truncation | ✅ | ✅ | ❌ | ✅ |
| No change of sign | ✅ | ✅ | ❌ | ✅ |
[^a]: Assuming a target with a pointer width of 64.