How to convert a public key to a sui address

Question from Discord:

How to convert the public key to sui address for Sui Move.

You need to hash the signature scheme flag byte concatenated with the public key bytes using the BLAKE2b hashing function. The Sui address should be a 32-byte hash. The BLAKE2b hashing function is available in the sui lib. You can find a Rust example of this here