Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.
/ ps Public archive

!! PROOF OF CONCEPT DO NOT USE !! The Philosopher's Stone — a library that makes `std::mem::transmute` safe :sparkles:

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

lambda-fairy/ps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Philosopher's Stone

This is a proof-of-concept library that lets you cast between arbitrary types in a safe way. In other words, it's a safe std::mem::transmute!

Example

let mut string_map: HashMap<u32, String> = HashMap::new();
string_map.insert(42, "world".into());

let bytes_map: HashMap<u32, Vec<u8>> =
    ps::hash_map_values(ps::string_bytes()).cast(string_map);

assert_eq!(map[42], b"world");

About

!! PROOF OF CONCEPT DO NOT USE !! The Philosopher's Stone — a library that makes `std::mem::transmute` safe :sparkles:

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages