Skip to main content

module_path_hash

Function module_path_hash 

Source
pub const fn module_path_hash(module_path: &str) -> u32
Expand description

FNV-1a hash of a module_path!(), carried by type descriptors to identify the defining module. A const fn so the macro can fold it into a constant: the descriptor interpreter cannot read static data, so the string itself cannot be informed at runtime. The macro (through wasm_bindgen::__rt) and the CLI must both use this one function.