#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

#450 in Procedural macros

Download history 133/week @ 2024-12-02 33/week @ 2024-12-09

166 downloads per month

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

~260KB