Append the per-crate hash to a wasm shim symbol so that identically named
exports from different crates (or different versions of one crate) cannot
collide at link time. The macro emits every export shim under this mangled
name; cli-support recomputes it from the hash carried in
Program::unique_crate_identifier and renames the export back to its
canonical name once matched.
mangled_symbol further qualified by the defining module, for wasm
symbols of items that may share a name across modules of one crate. The
macro only learns the module path from rustc, so it emits this as
concat!(module_mangled_symbol(base, hash, ""), module_path!()).
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.
Compute a “qualified name” by prepending the namespace (joined with __) to the js_name.
When there is no namespace, this returns the js_name unchanged.
This is used to disambiguate internal wasm symbols when the same js_name
appears in different namespaces. __ is used as the separator because
double underscores are unlikely to appear in user-defined names.
Symbol name of the wasm export that upcasts a *const WasmRefCell<Child>
pointer to a cloned Rc<WasmRefCell<Parent>> raw pointer. Used by the
macro codegen and by cli-support’s JS emission to call each other.