#xxh3 #identifier #hashed #hash #macro #literals #hash-id

macro xxh3_hashid_macro

XXH3 hashed identifier literals

1 unstable release

0.1.0 Dec 7, 2024

#467 in Procedural macros

MIT license

3KB

xxh3_hashid_macro

This crate provides a macro that allows XXH3 "hashed identifiers" to be created at compile time. Mostly useful for games, but you may find another use for it.

Example

use xxh3_hashid_macro::hash;
let id = hash!("example_id");
println!("0x{:0>16x}", id); // 0xf826a9bb47f7ff34

lib.rs:

use xxh3_hashid_macro::hash;
let id = hash!("example_id");
println!("0x{:0>16x}", id); // 0xf826a9bb47f7ff34

Dependencies

~255KB